Special characters in LIKE statement

I am looking to perform the following in SQL Server 2005 but I guess due to the character '#' the LIKE statement does not seem to be returning any result.

SELECT * FROM Table WHERE keyword LIKE '%C#%'

Please advice.

Answers


I guess there is no string in your table which contains "C#" this string.


The only time you escape keywords in LIKE statement is when you are searching for %, _, and [. So that means # is ok.


Must be something else. Check this SQL Fiddle working code using # character


Need Your Help

Spring Jdbc query execution

sql sql-server spring jdbc spring-jdbc

Does anyone know how what Spring Jdbc template method I could use to execute this 'upsert' or an alternative approach that would also perform the operations in one database call?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.