MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

count number of characters

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
ranjit5311
Beginner


Joined: 27 Nov 2005
Posts: 27
Topics: 14

PostPosted: Tue Aug 21, 2007 6:40 am    Post subject: count number of characters Reply with quote

Hi,

I required to check the count of chacters present in a column's value of a table. The column is defined as char(150). So I am not able to use LENGTH funtion.

E.g:-
Column Value
-----------------
abc
ab
defg

Result:-

3
2
4

Could any one suggest how the above objective can be achived.

Thanks,
Ranjit
_________________
One should move lightly through the life, carrying no excess baggage.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue Aug 21, 2007 6:43 am    Post subject: Reply with quote

ranjit5311,

Try this


Code:

SELECT LENGTH(RTRIM(COL1))
  FROM Table
;


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group