![]() ![]() Set serveroutput on set lines 80 set head off set colsep ','set pages 0set feed offspool datamig.sqlselect 'set colsep '',''' from dual select 'set lines 9999' from dual select 'set head off' from dual select 'set pages 0' from dual select 'set feed off' from dual beginfor table_rec in (select table_name from user_tables WHERE table_name IN ('LEGAL_AID_AMENDMENT')) loop dbms_output.put_line('spool '||table_rec.table_name||'.csv') dbms_output.put_line('select * from '||table_rec.table_name||' ') end loop end /select ' spool off' from dual spool I have created the following sql file and run it against the database in SQL + but it is not creating the csv files albeit it is displaying the data in the table(s).Ĭan anyone advise as to where I have gone wrong please? The only way that I can think of is by spooling from SQL+. ![]() Unfortunately, both of these options are not available because the export is from an Oracle 7.2 environment and I believe UTL_FILE came in 7.3. ![]() Ideally this sort of action would be done using the UTL_FILE or export function in SQL developer. I need to export all tables and data into csv files with a new csv file created for each table as it loops through the tables. I am currently running a large data export from an old legacy database. ![]() 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.9K Oracle Database Express Edition (XE).3.8K Java and JavaScript in the Database. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |