CR no LF problem in SQL server Stored Procs

CR no LF problem in SQL server Stored Procs

Post by adam » Sat, 29 Mar 2003 19:37:50



I thought I'd make things easy for myself by writing a stored proc to
generate another stored proc based on a view.  The generated code looked ok
and was successfully put into the server (SQL Server 2k).  The problem was
that it did not actually do anything.  After most of the day going through
possible causes of the error and effectively re-building the SP by hand
(which worked) I discovered that in the generate SP I was using CR
[char(13)] and simply changing it to CRLF [char(13) + char(10)] worked.

I can only assume that this is a bug.  If SQL is going to reject the proc
based on the non-standard CRLF then that's ok but silently accepting the SP
and not running it is some what annoying.

adam

 
 
 

CR no LF problem in SQL server Stored Procs

Post by Andrew J. Kell » Sat, 29 Mar 2003 22:30:03



--

Andrew J. Kelly
SQL Server MVP


Quote:> I thought I'd make things easy for myself by writing a stored proc to
> generate another stored proc based on a view.  The generated code looked
ok
> and was successfully put into the server (SQL Server 2k).  The problem was
> that it did not actually do anything.  After most of the day going through
> possible causes of the error and effectively re-building the SP by hand
> (which worked) I discovered that in the generate SP I was using CR
> [char(13)] and simply changing it to CRLF [char(13) + char(10)] worked.

> I can only assume that this is a bug.  If SQL is going to reject the proc
> based on the non-standard CRLF then that's ok but silently accepting the
SP
> and not running it is some what annoying.

> adam


 
 
 

1. SQL*Net : LF -> CR+LF conversion

Greetings.
I noticed that SQL*Net automatically translates LF characters into CR+LF
sequences when a Windows client connects to a Unix database server. For
particular reasons, I DON'T WANT SQL*Net TO DO SO. Do you have any tips?

Thanks in advance - Best Regards,
Cristian Veronesi

2. W4GL - "Invisible" frames start up iconised

3. R: SQL*Net : LF -> CR+LF conversion

4. VBSQL.OCX

5. Convert LF to CR/LF in a VARCHAR

6. Relational Databases ??

7. Problems with CR/LF in fixed field -text files

8. (no subject)

9. Text-problem CR/LF

10. Importing Text - LF/CR problem

11. Problems when IMPORTing from file without CR/LF

12. FM4 PC - Text Ouptut Formatting - CR and LF problem

13. Problem with CR-LF