[Oracle] SQL script with SPOOL command
Arch
-
Arch -
Arch -
Hello,
I am currently creating an SQL script using the command 'SPOOL <file name="">', my SQL, and then 'SPOOL OFF'.
I should mention that my query works (tested separately).
But now I'm getting an error [Err] ORA-00922: missing or invalid option and I think it's a syntax issue (I get this error when it encounters a ';', should I not include it at all?).
Thank you for your help!</file>
I am currently creating an SQL script using the command 'SPOOL <file name="">', my SQL, and then 'SPOOL OFF'.
I should mention that my query works (tested separately).
But now I'm getting an error [Err] ORA-00922: missing or invalid option and I think it's a syntax issue (I get this error when it encounters a ';', should I not include it at all?).
Thank you for your help!</file>
1 réponse
Hello,
copy/paste your script here and you will get a quick response.
otherwise it's:
SPOOL F:\my_log.txt
or
SPOOL my_log.txt
SELECT ....
FROM
WHERE.... ;
SPOOL OFF
http://www.dba-ora.fr/
--
Experience is what everyone calls their mistakes.
copy/paste your script here and you will get a quick response.
otherwise it's:
SPOOL F:\my_log.txt
or
SPOOL my_log.txt
SELECT ....
FROM
WHERE.... ;
SPOOL OFF
http://www.dba-ora.fr/
--
Experience is what everyone calls their mistakes.
Under TOAD it works, now with Navicat I don't know if it handles the output (SPOOL).
Now, do you know why there are always SQL statements in the output file (the query and commands), even after setting echo to off?
works only in scripts, not in interactive mode.
You need to call the script instead of executing it in interactive mode
SQLPLUS login/password@tns @YOUR_SCRIPT.SQL
http://www.dba-ora.fr