21-04-2010

MSSQL charindex in where clause

You can use the CHARINDEX function in a where clause much as you would use the LIKE keyword in a query. For more discussion see:

http://bytes.com/topic/sql-server/answers/81467-using-charindex-vs-like-where

SELECT * FROM Table1 WHERE CHARINDEX('value', mycol) > 0
Keywords: charindex LIKE

Comments:

Your comment:

»

 

[x]