HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

What is the best way to find out how many records do not have a proper phone number in SQL Server?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thenumberhowwhatserversqlrecordswaymanyfind

Problem

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.

Solution

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.

Context

StackExchange Database Administrators Q#1315, answer score: 7

Revisions (0)

No revisions yet.