Pages

Saturday, February 28, 2009

CHARINDEX in SQL Server

One of the very intresting question in my mail box is I have INSTR function in oracle and what is equivalent in SQL Server?? In fact this is the easiest way tgo learn new SQL server if you know Oracle or Vice-Versa.

Well the asnwer is CHARINDEX. Check out the below syntax.

CHARINDEX ( expression1 ,expression2 [ , start_location ] )

Searches expression2 for expression1 and returns its starting position if found. The search starts at start_location.

No comments: