1

I want to export all my datas as insert statement. In Sql Developer, the command "set sqlformat insert" work very well... but when I want to use it on sqlplus, I have this error message : SP2-0158 unknown SET option "sqlformat"

This command work when it's use on a script but i've made a script :

spool /data/scripts/result/test.sql
set sqlformat insert;
select * from mytable;
spool off

I've try the same code on SQLdev and it works...

How can I use it correcly on sqlplus ?

Julien BARBE
  • 23
  • 1
  • 5
  • [Here is the syntax for SQL\*Plus 19c SET commands](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqpug/SET-system-variable-summary.html). There's no `sqlformat`. – William Robertson Feb 20 '21 at 10:07

1 Answers1

2

sqlformat insert is NOT an sqlplus acceptable format, try it with sqlcl. It should work (and allow you to use the same setting as you can do in sqldev)

gsalem
  • 1,957
  • 1
  • 8
  • 7
  • Yes! We built SQLcl to address the shortcomings in SQL*Plus for day to day oracle database work at the command line. Slides/examples on SQLFORMAT here https://www.slideshare.net/hillbillyToad/oracle-sqlcl-formatting-your-query-results?ref=https://www.thatjeffsmith.com/ – thatjeffsmith Mar 22 '21 at 17:54
  • sqlcl - will be in your sqldev/bin directory, or avail as a separate download https://www.oracle.com/tools/downloads/sqlcl-downloads.html – thatjeffsmith Mar 22 '21 at 17:56