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

Select fields of a certain length

Status
Not open for further replies.

cocopud

Technical User
Jan 8, 2002
139
US
I have a field that is 5 characters. Most of the data is either 3 or 4 characters. How can I select all the fields that are of 5 character length. I have tried using LIKE with 5 _ ('_____'), but that brings back everything. Not sure how to return just fields with 5 characters. Thanks
 
Code:
Select *
From   YourTable
Where  Len(YourColumn) = 5

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top