vcujackson
Technical User
SELECT addrid, addrphone, addrline1, addrcity, addrplace, addrzipcod, addrdate
FROM dbo.address_full
WHERE
(addrphone NOT LIKE '[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9][0-9]')
AND (addrforign = 'N')
and addrphone is not null
Platform used: SQL 2005
The above script is supposed to pull all invalid phone numbers or those that do not follow the following pattern:
XXX.XXX.XXXX
When I run this in QA, I do get the invlaid numbers but I also get blank or null values in the phone field even though I put in a statement at the end that says and addrphone is not null. Why am I getting the blank or null phone numbers?
FROM dbo.address_full
WHERE
(addrphone NOT LIKE '[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9][0-9]')
AND (addrforign = 'N')
and addrphone is not null
Platform used: SQL 2005
The above script is supposed to pull all invalid phone numbers or those that do not follow the following pattern:
XXX.XXX.XXXX
When I run this in QA, I do get the invlaid numbers but I also get blank or null values in the phone field even though I put in a statement at the end that says and addrphone is not null. Why am I getting the blank or null phone numbers?