Invalid Create Command When It Is Used With Another Command
I am trying to print query result using solution in that page. The spool solution didn't work in my project but the other one worked in sqldeveloper. 'run_query' procedure defined
Solution 1:
I don't know C# but I assume you can only send individual SQL statements or PL/SQL blocks, not a list separated by semicolons. In any case, exec is neither (it's a SQL*Plus shortcut supported by some IDEs.)
You probably need to send separate commands as something like:
create directory test_dir as'C:\\'and
begin run_query('SELECT {1} FROM {2} {3} ORDER BY {4}','TEST_DIR','{5}'); end;
(Note PL/SQL uses semicolons but SQL has no native statement terminator, although tools often require a terminator character and semicolon is often the default.)
Post a Comment for "Invalid Create Command When It Is Used With Another Command"