Patindex: Returns the string position of the first occurrence of pattern
Ex: Select patindex(‘%o%’, ‘Microsoft’)
Ans: 5. Note: % is must
Charindex: Same as patindex but you can specify the string position.
Ex: charindex ( Expression1, Expression2 [ , start_location])
What is patindex and charindex in SQL
Posted by
Rajesh Rolen
at
Friday, September 4, 2009
Labels: ASP.NET Interview Questions , Interview Questions , SQL
0 comments:
Post a Comment