Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Filtering # Characters

Author  Topic 

swoozie
Starting Member

25 Posts

Posted - 2014-03-10 : 11:04:11
I am having a difficult time filtering text that contains a pound\hash sign. # I have tried, like, in even WHERE right(Left(c.field,3),1) Not in ( '#' )

to no avail, it filters out the # record but also the NULLS, I need the NULLS other than doing this in a 2 part process, any suggestions?

Thanks,

Susan

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2014-03-10 : 12:08:55
how about ..

WHERE (c.field Not like '%#%' OR c.field IS NULL)

Cheers
MIK
Go to Top of Page
   

- Advertisement -