|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 9/17/2008 9:37:04 AM
Posts: 3,
Visits: 3
|
|
Hi, I have got a character string with muliple lines (user presses carriage return). I need to count the number of lines (number of times carraige return) is entered. Does anyone know how to do it.
Manish
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/21/2008 10:45:25 PM
Posts: 79,
Visits: 98
|
|
You should be able to use a recursive query to do the job. Look at this post:
http://www.teradata.com/teradataforum/Topic11452-9-1.aspx
In that example the separator was a ‘,’. You can change that to your line separator character.
If you just want the count then just change the last line of the query from:
select subpart from temp_table;
to
select count(subpart) from temp_table;
good luck.
|
|
|
|