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

Home -> Community -> Usenet -> c.d.o.misc -> Re: formatting output with SQL*Plus

Re: formatting output with SQL*Plus

From: GQ <dbaguy_ott_at_yahoo.com>
Date: 8 Dec 2004 11:48:45 -0800
Message-ID: <1102535325.743663.46880@c13g2000cwb.googlegroups.com>


You don't really need to create a procedure in the database ... You can do it within an anonymous block (in a sqlplus session) For example
set serveroutput on
declare
cursor c_val is
select memb1,memb2 from family;

v_col1              varchar2(2000);
v_col2              varchar2(2000);

begin
open c_val;
fetch c_val into v_col1,v_col2;
while c_val%found loop
dbms_output.put_line(v_col1 ||'|'||v_col2); fetch c_val into v_col1,v_col2;
end loop;
end;
/
Note that you could also use utl_file for larger amounts of data. Received on Wed Dec 08 2004 - 13:48:45 CST

Original text of this message

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