Last post Aug 02, 2016 11:11 AM by balu.devara
Aug 01, 2016 03:58 AM|TechView|LINK
Aug 01, 2016 04:05 AM|oned_gk|LINK
try replace underscore with empy firts
where replace(col1,'_','') = replace(@search,'_','')
Aug 02, 2016 09:00 AM|Chris Zhao|LINK
Is there any way to search it I mean when I search with the second name using Sql like, it does not show up. So would expect some suggestions from the experts if it is actually possible to get the details from database using the second name.
You could use this.
where column like '%[_]%'
reference: Pattern Matching in Search Conditions
Aug 02, 2016 11:11 AM|balu.devara|LINK
can you try bellow code.
declare @dt table(
insert into @dt values('ssss__')
declare @search varchar(200)='ss___'
select * from @dt where replace(col1,'_','') like '%'+ replace(@search,'_','')+'%'