[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SQL Server Help - Is there an alternative to PatIndex

Posted on 2013-05-28
2
Medium Priority
?
697 Views
Last Modified: 2013-06-14
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
0
Comment
Question by:hojohappy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Expert Comment

by:awking00
ID: 39202440
Can you supply some sample data for prod_cd and what you expect to return?
0
 
LVL 70

Accepted Solution

by:
Scott Pletcher earned 1000 total points
ID: 39202513
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

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question