Home » RDBMS Server » Server Administration » writing large records to output files
writing large records to output files [message #370336] Sun, 29 August 1999 14:22 Go to next message
scott campbell
Messages: 13
Registered: July 1999
Junior Member
I am required to write rows, each consisting of up to 160 columns ( and 1500 bytes ), to output files. I'm considering using a cursor to read the table, fetching the columns into variables and appending each to a file. Please/thanks is there an easier way?
Re: writing large records to output files [message #370345 is a reply to message #370336] Tue, 31 August 1999 11:58 Go to previous messageGo to next message
Jack Songradish
Messages: 2
Registered: July 1999
Junior Member
Read related references about UTL_FILE utility in Oracle, probably give you some ideas to make your job done easier. I haven't tried it but known it should work out for your issue.
Re: writing large records to output files [message #370463 is a reply to message #370336] Thu, 11 November 1999 12:45 Go to previous messageGo to next message
Cormac Bland
Messages: 1
Registered: November 1999
Junior Member
I'm trying the same thing at the moment.
I used pl/sql to fetch the columns into variables
and then output these using the DBMS_OUTPUT.PUT_LINE utility. However this has a limit of 255 characters per line and in my case each line is 1000 long. I think the UTL_FILE
utility has the same limit.

The only way I see is to write the variables to a new table. Then use a simple SQL (with spool on)
to select each column from the new table. You can set the linesize to be 1000 and it is ok.
I'm sure there must be an easier way to do it though ?
Re: writing large records to output files [message #370464 is a reply to message #370463] Sat, 13 November 1999 13:22 Go to previous message
scott campbell
Messages: 13
Registered: July 1999
Junior Member
Thanks for the suggestion. It helped a lot.
Previous Topic: Bug 902521: FUNCTION BASED INDEX
Next Topic: Re: SQL Plus spooling problem
Goto Forum:
  


Current Time: Fri Mar 29 09:00:18 CDT 2024