Quantcast
Channel: Toad for Oracle Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4385

RE: How do I add the colum'names in exporting SQL to text using Run as script

$
0
0

--I hade some adjustments based on Norm's email . I am not at work / no access to Toad.

--I removed one set command and changed headings to off

--also you don't need a group by

set pagesize 0
set trimspool on
set echo off
set embedded off
set feedback off
set heading off
set serveroutput on
set linesize 2000


spool D:\BK210.txt

begin

dbms_output.enable(100000);

dbms_output.put_line('CLI;AGE;NCP;DEV');     --these are your column headings

end;

/

Select d.cli||';'||d.age||';'||d.ncp||';'||d.dev
from prod.bkhis d
group by d.cli, d.age, d.ncp, d.dev
order by d.cli asc
;

spool off

exit


Viewing all articles
Browse latest Browse all 4385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>