incorrrect phone using ASCII

Last Post 16 Oct 2007 08:05 AM by roma. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
roma
New Member
New Member

--
16 Oct 2007 06:49 AM
Hi,
I try to find all customers with incorrect phone number
This select doesn’t work for me.
Where is my problem?

Thank you

select * from customers_address
where TelephoneNumber like (ASCII('% %')>=65) or TelephoneNumber like (ASCII('% %')<=90)
roma
New Member
New Member

--
16 Oct 2007 08:05 AM
Hi russellb,

I have phone’s # format like 1234567891.
I am looking for phone numbers which not in format like ‘abc1213567’
That select
select * from customers_address where TelephoneNumber like '%[^0-9]%'
give me the error: incorrect syntax near ‘^0-9’ .
What it can be the problem?

Thanks
roma
New Member
New Member

--
16 Oct 2007 11:46 AM
I use SQL server 2000.

Second query working fine, however first one - doesn't
roma
New Member
New Member

--
16 Oct 2007 11:49 AM
I found my problrm, it is work now, thank you all
You are not authorized to post a reply.

Acceptable Use Policy