Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to find rows with upper case characters.

Status
Not open for further replies.

fal762

Programmer
Aug 6, 2002
4
US
Hi all. I'm using SQL Server 2000 and have a large table with a varchar field containing email addresses. I need to find those rows whose email address any upper case letter in any position in the address. Other than running a query for each upper case letter is there a better way to find such rows.

Thanx.
 
select *
from tbl
where email like '%[A-Z]%' collate Latin1_General_CS_AI

You can miss out the collate if you are case sensitive.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top