Home All Groups Group Topic Archive Search About

search for record with alpha characters

Author
4 Nov 2005 12:51 AM
culam
I am a zipCode4 field, and some of them have letters in it.
I would like to search those that contain letter(s) in it.

Thanks for your help,
Lam

Author
4 Nov 2005 1:21 AM
Itzik Ben-Gan
Lam,

Try:

WHERE zipCode4 LIKE '%[a-z]%'

Or, if you want to return those that contain anything but digits, use:

WHERE zipCode4 LIKE '%[^0-9]%'


--
BG, SQL Server MVP
www.SolidQualityLearning.com

Join us for the SQL Server 2005 launch at the SQL Week in Israel!
http://www.microsoft.com/israel/sql/sqlweek/default.mspx


Show quote
"culam" <cu***@discussions.microsoft.com> wrote in message
news:B61A0507-4141-4640-8919-382EB8845BF2@microsoft.com...
>I am a zipCode4 field, and some of them have letters in it.
> I would like to search those that contain letter(s) in it.
>
> Thanks for your help,
> Lam

AddThis Social Bookmark Button