Osql replaces line feed with carriage return + line feed

Osql replaces line feed with carriage return + line feed

Post by Andreas Sisas » Fri, 05 Apr 2002 23:07:43



Hello,

I have a insert statement like:

insert into temp values ('Abc\ndef') - where \n is the line feed symbol

When I execute this statement with query analyzer - it puts the value into
database exactly as defined.

But when I execute the statement with osql utility reading it from input
file the osql replaces the \n with \r\n and puts this into database.

Is there anyway to tell osql not to do it?

Btw, I'm 100% sure that in the text file there is no \r and it's not some
text editor problem.

Andreas

 
 
 

Osql replaces line feed with carriage return + line feed

Post by Eric Weinraub[M » Sun, 07 Apr 2002 02:43:50


Try the following:

insert into temp values
select 'Abc'+ char(10) +'def'

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure?  For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

 
 
 

1. Osql replaces line feed with carriage return + line feed

Hello,

I have a insert statement like:

insert into temp values ('Abc\ndef') - where \n is the line feed symbol

When I execute this statement with query analyzer - it puts the value into
database exactly as defined.

But when I execute the statement with osql utility reading it from input
file the osql replaces the \n with \r\n and puts this into database.

Is there anyway to tell osql not to do it?

Btw, I'm 100% sure that in the text file there is no \r and it's not some
text editor problem.

Andreas

2. foxpro positions

3. Carriage Return Line Feed

4. DTS error

5. Losing Carriage Return / Line Feeds Importing Data

6. Newbie question about Database support in VC++

7. Removing Carriage Returns and Line Feeds from Text Datatype

8. ** Release of GNU Ada Database Environment **

9. save and retrieve carriage return and line feed chars

10. Losing Carriage Return / Line Feeds Importing Data

11. Carriage return/line feed in SQL statement

12. Line Feed and Carriage return