| CHR(13)||CHR(10) at the end of the sql [message #326242] |
Tue, 10 June 2008 17:42  |
apps_user
Messages: 35 Registered: May 2008
|
Member |
|
|
HI
I am creating a sql extract for Windows format from unix.
In my sql I added CHR(13)||CHR(10) to the sql in order to add {CR}{LF} at the end of each row for Windows format.{CR} stands for Carriage Return and {LF} starts for line feed.
But once I added CHR(13)||CHR(10)to the sql,it is creating a blank line between {CR} and {LF}.
Previously the extract used to be
Now it is
Please help me.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: CHR(13)||CHR(10) at the end of the sql [message #326287 is a reply to message #326284] |
Wed, 11 June 2008 00:01   |
 |
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
| apps_user wrote on Tue, 10 June 2008 21:56 | declare a variable of char type.
in the begin section
assign the variable with the concatenated string of CHR(13) and CHR(10).
Then call the variable in the select.
|
and how exactly did this improve the situation with the extra blank link which was initially reported?
Please post a complete & functioning example with both before & after reproducible SQL.
[Updated on: Wed, 11 June 2008 00:03] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: CHR(13)||CHR(10) at the end of the sql [message #326518 is a reply to message #326312] |
Wed, 11 June 2008 20:30  |
dizwell
Messages: 3 Registered: May 2007
|
Junior Member |
|
|
Got it in one: readability.
When I have lengthy text messages before the XML/Excel component, I have a lot of linebreaks to insert. The code looks appalling with all those chr(xx) bits in there. I just insert the variable 'linefeed' instead, and it looks rather tidier (at least to my eyes).
I've never experienced the problem the OP originally reported.
Neither, like you, do I understand how using a variable containing concatenated values differ from using those concatenated values directly.
Oh well...
HJR
|
|
|
|