SPUG: Perl shines for data validation
Michael R. Wolf
michaelrwolf at att.net
Thu Dec 10 19:52:37 PST 2009
I just saw this as a suggestion to flag invalid phone numbers as a
validation routine for importing into a hosted database application.
I think they were serious.
LEN(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(MobilePhone, "(", ""), ")", ""), "-",""),"
",""),".",""),"/","")) <> 10
Eeeeekk. SQL is not the right tool for this job.
--
Michael R. Wolf
All mammals learn by playing!
MichaelRWolf at att.net
More information about the spug-list
mailing list