SQL Server Help - Is there an alternative to PatIndex

In MS SQL Server, is there an alternative to PatIndex?  I have the Select Query below which currenly uses the PatIndex function but is there another way this can be with a different function? The purpose of this query is to identify invalid chars in a column.


SELECT *
FROM [Addresses.txt]
WHERE PatIndex('%[^a-z0-9]%', [Addresses.txt].[PROD_CD]) > 2
hojohappyAsked:
Who is Participating?
 
Scott PletcherConnect With a Mentor Senior DBACommented:
I don't know of any other built-in function that duplicates what PATINDEX() does.  After all, why would there need to be two built-in functions that did the same thing?!
0
 
awking00Commented:
Can you supply some sample data for prod_cd and what you expect to return?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.