Hi! Does SQL Server have an equivalent of the inStr function in Access? Basically, I need to evaluate a field if it has a specific string. For example, I need to know if there is "DDD" in the string "ERTGDDDE".
PatIndex and CharIndex can return position numbers within a string where your pattern occurs.
Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
The closest T-SQL thing to VB-like inStr() function is CHARINDEX().
PATINDEX() works with patterns, so wildcard characters (%, _, blah) are interpreted different way.
------ "There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.