benedick96
2006-03-16 18:11:12 UTC
In SQL Server, when you have a TEXT field, it can store some long-text.
You can also insert a CRLF in the text so that it displays with a CRLF
on-screen and when printed.
I am using a customized program to import data into SQL Server (a
program I cannot edit).
I have source data that has three string fields that I want to
concatenate into a single TEXT field in SQL Server.
For example:
String1: Please call John
String2: at extension 55
String3: Tax ID# 12345
I want this to go into the SQL Server text field as:
Please call John + CRLF+ at extension 55 + CRLF + Tax ID# 12345
However, the data import tool I'm using won't allow this.
The best I can do is replace the CRLF with a specific text string.
In this case, I chose $LF$
So - in the SQL text field I have the following data:
Please call John$LF$at extension 55$LF$Tax ID# 12345
I am looking for some TSQL code I can run the will replace the specific
text string $LF$ with a CRLF. Anyone have an idea how to do this?
thanks!
You can also insert a CRLF in the text so that it displays with a CRLF
on-screen and when printed.
I am using a customized program to import data into SQL Server (a
program I cannot edit).
I have source data that has three string fields that I want to
concatenate into a single TEXT field in SQL Server.
For example:
String1: Please call John
String2: at extension 55
String3: Tax ID# 12345
I want this to go into the SQL Server text field as:
Please call John + CRLF+ at extension 55 + CRLF + Tax ID# 12345
However, the data import tool I'm using won't allow this.
The best I can do is replace the CRLF with a specific text string.
In this case, I chose $LF$
So - in the SQL text field I have the following data:
Please call John$LF$at extension 55$LF$Tax ID# 12345
I am looking for some TSQL code I can run the will replace the specific
text string $LF$ with a CRLF. Anyone have an idea how to do this?
thanks!