CharIndex | PatIndex | |
1 | Returns the Starting position of specified Expression in Character String. | Returns the Starting position of First Occurrence of a pattern in Specified Expression, Or Zeros if Pattern is not found. |
2 | In Charindex you can specify Start location. | In PatIndex you can not specify starting location. It will return you First Occurrence of a pattern |
3 | SELECT CHARINDEX(‘;’,’ Output : 8 It will give u position of Semicolon. | Example : SELECT PATINDEX(‘%A%’,’ Output : 7 It will give u position of First occurrence of A. |
Monday, November 30, 2009
Charindex Vs Patindex
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment