declare @val1 varchar(100) set @val1='abcd' declare @val2 varchar(10) set @val2='ab' if @val1 LIKE @val2 + '%' print 'STARTSWITH' if @val1 LIKE '%' + @val2 print 'ENDSWITH'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)