The CHARINDEX and PATINDEX functions return the
starting position of a pattern you specify. PATINDEX can use wildcard
characters, but CHARINDEX cannot.
These functions take two parameters:
· The pattern whose position you want. With PATINDEX,
the pattern is a literal string that can contain wildcard characters. With
CHARINDEX, the pattern is a literal string without wildcard characters.
·
A string-valued expression, generally a column name,
searched for the specified pattern.
SELECT CHARINDEX('JA','VIJAY')
O/P :- 3
SELECT PATINDEX('%GMAIL%','VIJAYK0286@GMAIL.COM')
O/P :- 12
SELECT PATINDEX('%GM__L%','VIJAYK0286@GMAIL.COM')
O/P :- 12
Very Well Explained. Can you please also tell us Soundex,IsNumeric functions also.
ReplyDeleteHello,
ReplyDeleteYou can a send a mail for set of people.
You can loop through an SQL statement and perform certain action until end of the table. Thanks for sharing this article. the above article having a valuable information.
nice.Thank you for sharing Microstrategy Online Training
ReplyDeleteThis is really very nice blog to read, thanks for sharing wonderful information. keep share content on MSBI Online Training Hyderabad
ReplyDelete