How to validate a physical address using MSSQL

What would be a good way to check mailing addresses using MSSQL? The table I am working with currently has 1,448,634 entries, I would at least try to get addresses that don't start with a number... Thanks!
horaliaAsked:
Who is Participating?
 
TimBusiness Systems AnalystCommented:


WHERE NOT ISNUMERIC(LEFT(addressfield,1))

should pull any records that do not start with a digit.
0
 
TimBusiness Systems AnalystCommented:
EDIT:

If you want to check for PO boxes as well you could try;

WHERE ISNUMERIC(LEFT(address,1)) = 0
AND LEFT(address,3) NOT IN ('POB','P.O','P O','PO ')


I just tested this on a Northwind db and it worked well.
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.