Sql-server – the best way to find out how many records do not have a proper phone number in SQL Server

querysql serversql-server-2008

I have a field that people historically could use to freely supply a value. I need to identify the records which do not have an appropriate value so I can clean them.

I've been looking around in SSIS for this. My inclination is to use a script component with a regex expression in some C# code, followed by a redirect. Still, I was wondering if there was a way in SSIS to do this without resorting to C#.

I haven't had a lot of luck finding a way to find out how many records do not have appropriate phone numbers.

Best Answer

It is one time task. Write a small application or just select script, use C#, VB.NET, T-SQL...and analyze all patterns manually. Maybe you will find out common patterns by operators who inputed this data. Add an algorithm for every pattern. Apply your patterns to real data in a database. Remove all "wrong" records.

Luck.

ADDED:

As option, you can use database of telephone numbers to check person2number validity if it's possible.