Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: UTL_FILE -- creating a carriage return line feed running in UNIX

Re: UTL_FILE -- creating a carriage return line feed running in UNIX

From: Noons <nsouto_at_optusnet.com.au.nospam>
Date: 25 Feb 2003 13:55:42 GMT
Message-ID: <Xns932E6E906D8ATokenthis@210.49.20.254>


Following up on Donna B., 26 Feb 2003:

> Because the script is running in UNIX, the NEWLINE (linefeed) that is
> included with the PUT_LINE function is not coming out in the csv, so
> when the vendor (who's running on a SQL Server 2000 platform) looks at
> it, it's just one long run-on record. Is there any way to fix this?

Let me see if I understand this correctly. You run the UTL_FILE in the server which is Unix and you want to look at the output file using SS2K in Windoze? Correct?

Cool. Transfer the file across to the SS2K box using the native Windows FTP client against the Unix ftpd. It will do the conversion automatically if you "type" the file transfer as 'A' (ASCII).

If not (weird version of Windows?), then it is trivial to get someone to write a small C or Perl filter program (one that reads from STDIN and writes to STDOUT so that you can use it in a pipe) to do this for you. If that is too hard, use an editor such as VIM to look at the data. I think TOAD has the smarts for that too. Cut and paste.

Last resort: the old Windoze in-built word processor, Wordpad or whatever it is called today, will gladly read the file with the Unix newlines and write it out as a Windows text file with the proper CR/LF sequence.

Hint: Wordpad is a GREAT way to fix that darn "glogin.sql" in the Windoze Oracle distributions, which has the text in "Unix newline mode"!

> Gurus?

Nope, that one doesn't register...
;)

-- 
Cheers
Nuno Souto
nsouto_at_optusnet.com.au.nospam
Received on Tue Feb 25 2003 - 07:55:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US