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 |
|
macsterling
Yak Posting Veteran
56 Posts |
Posted - 2009-01-12 : 22:13:27
|
| I am conatenating several "note" columns into a single Master Note column for display on a screen. If I just say Master = note1 + note2, they are run together. What I need is to insert a CRLF after the end of each note, so the next will start on a new line. (will probably also stick in a 'Note 1: ==========' and a 'Note 2: ==========' between them to make things clear (the notes are often several lines long. I have tried all sorts of ascii(13) ascii(10) combinations, but can't get it right. any suggestions?Thanks,Mac |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
macsterling
Yak Posting Veteran
56 Posts |
Posted - 2009-01-12 : 22:48:14
|
| I don't have control inside the app. I am doing the conversion from an older system to the new one - just building the tables. It is the old two pounds in a one pound jar routine. If the old system has CRLFs they come over fine. I just can't get the syntax correct to put new ones in. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-13 : 00:07:11
|
| write a UDF to do concatenation along with CHAR(10) & CHAR(13) or use FOR XML PATH if you're using sql 2005 or later |
 |
|
|
|
|
|