Monday, February 20, 2012

Query strings that dont start with a letter

I have a table in Sql Server 2000 called Users. The field in question here is "Username". I need to create a query that returns "Usernames" that starts with anything other than letters from the alphabet. For example: numerics, -, !, # and so on...

Does anyone know how to do this?

Thanks alot!Hi DrEaMON,
1.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_la-lz_115x.asp
LIKE statement syntax

2.
select UserName
from Users
where UserName like '[^A-Z]%'|||Thank you! That's exactly what I needed.

You learn something new every day huh!?!

No comments:

Post a Comment