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 |
|
AaronSC
Starting Member
10 Posts |
Posted - 2003-12-17 : 10:05:34
|
| Hi,Can anybody tell me how to insert a CRLF in TSQL??? I am importing some data from a legacy system into what will be a notes field and I need to ensure that the entries are formatted with a new line between each.ThanksAaron Collett |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-12-17 : 10:07:27
|
| char(10) + char(13)or just''==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
AaronSC
Starting Member
10 Posts |
Posted - 2003-12-17 : 10:29:42
|
Thanks, that worked perfectly. Aaron Collett |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-12-18 : 08:44:59
|
| Actually it's char(13) + char(10), although the other way might work, you may get strange results. |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-12-18 : 08:52:45
|
| Thanks Rob - I always make that mistake.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
AaronSC
Starting Member
10 Posts |
Posted - 2003-12-18 : 08:55:14
|
quote: Originally posted by robvolk Actually it's char(13) + char(10), although the other way might work, you may get strange results.
Yes, I actually lied (not deliberately - Honest ) the first time I ran the modified SP, I viewed the data in the app and saw box looking characters (sorry I dont know the proper names - if they have proper names) because it was lfcr and not crlf, but anyway, once I knew the approach, it was not a problem.Aaron Collett |
 |
|
|
|
|
|