January 6, 2009 at 10:19 am
How can I select a field that contains only 5 charecters. Thank you
January 6, 2009 at 10:32 am
Assuming you mean the total length is 5 characters including any embedded spaces then..
select foo from bah where len(foo) = 5
or if the embedded spaces do not count
select foo from bah where len(replace(foo,' ','') = 5
If that is not what you needed can you post more details including full DDL of the table in question.
Mike
January 6, 2009 at 10:47 am
Or select left(foo, 5) from bah
The question was a tad ambiguous at best.
January 6, 2009 at 11:46 am
Thank you
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply