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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query by number of characrers in a data column?

Status
Not open for further replies.
Apr 3, 2003
180
US
Hello, is there a way to query a sql database by the amount of characters? I am trying to find account numbers longer than 12 characters. Thanks

"I hear and I forget. I see and I remember. I do and I understand."
- Confucius (551 BC - 479)
 
Did you try:

Code:
SELECT
    column(s)
FROM table
WHERE LEN(somecolumn) > 12

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
C#.NET Programmer
 
No but that worked! Thanks so much

"I hear and I forget. I see and I remember. I do and I understand."
- Confucius (551 BC - 479)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top