Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Anamika
Starting Member
3 Posts |
Posted - 2007-09-21 : 09:23:03
|
I want to find the no. of lines in my text field inclusive of trailing spaces and new lines. ex:MARY HAD A LITTLE LAMBFLEECE WAS WHITE AS SNOWshould return me 2 I tried DATALENGTH()Any suggestions?Anamikahttp://technoblab.blogspot.com |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-09-21 : 09:30:35
|
Count number of CR characters in your text field using charindex(). You can write a UDF for this.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
PeterNeo
Constraint Violating Yak Guru
357 Posts |
Posted - 2007-09-21 : 09:40:48
|
Hi,try thisSELECT CHARINDEX(CHAR(10), urfield) FROM urtableLook for CHAR() in BOL |
 |
|
|
|
|