|
Posted by Hugo Kornelis on 11/28/28 11:58
On 14 Sep 2006 19:05:04 -0700, nashak@hotmail.com wrote:
>Hello,
>
>In a Stored Proc, I am building a string variable. I am getting outputs
>from 4 different queries and would like the string to have line breaks
>to display each entry in a different line in a text area. How can I do
>this?
Hi Nashak,
In addition to the answers already given by Alexander and Dan, here's
another option - just use a newline character inside a string constant.
For example:
SELECT 'First line
Second line.'
This will show the output on two lines (make sure to select output to
text, not output to grid - the grid doesn't handle newlines too well).
If the data comes from columns, try
SELECT Column1 + '
' + Column2
FROM YourTable
WHERE ....
--
Hugo Kornelis, SQL Server MVP
Navigation:
[Reply to this message]
|