spool insert statement without select statement

Hello,

I want to spool insert statement when I execute this query without having select statement.

Thanks

bibi
bibi92Asked:
Who is Participating?
 
slightwv (䄆 Netminder) Commented:
Do not copy/paste the select into sqlplus.

Create a script, say myscript.sql with:
---------------------
set lines 1000
set pages 0
set trimspool on
set feedback off

spool myoutput.sql
select ' insert into ' from table_name ...
spool off
--------------------------



Then execute the script in sqlplus:
SQL> @myoutput
0
 
bibi92Author Commented:
THANKS BIBI-
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.