| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get Oracle view into delimited UNIX file?
Sure, spool to your file and use dbms_output.put_line from a pl/sql program. Just be sure to turn off all the other crap sql*plus will output (various set options). You can set the whole thing up in a UNIX script to invoke sql*plus running the pl/sql program (either an anonymous block straight or a call to a stored procedure which will run faster). With put_line you can format the data any way you want, but the line is restricted to 255 bytes before the newline (which is a LINEFEED chr(10) on UNIX). Also, be sure to use dbms_output.enable(1000000); for the largest buffer possible if you're going to have a lot of rows. If the 255 limit bothers you, use S. Feuerstein's PL/Vision stuff (see revealnet.com).
![]() |
![]() |