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

sql server2000, counting characters in a string 1

Status
Not open for further replies.

duchovnick

Programmer
Jan 4, 2007
115
IL

Hi,
I have a string which i want to be displayed only if its' number of characters is greater then,
say, five. My code is:
Code:
SELECT
CASE number_of_characters(mytable.mystring)
WHEN GT 5 THEN mytable.mystring
END
can anyone help me with the right code to:
number_of_characters(mytable.mystring)
?
Thanks
 
something like
Code:
IF (select len('test')) > 3
 BEGIN
  PRINT 'something'
 END

LEN() function

____________ signature below ______________
The worst mistake you'll ever make is to do something simply the way you know how while ignoring the way it should be done
 
:)

____________ signature below ______________
The worst mistake you'll ever make is to do something simply the way you know how while ignoring the way it should be done
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top