1

I'm using spool to save the output of my query into a text file but what is actually doing is save the sql commands into the file.

I have:

SPOOL D:\sqltestes\sql_test.txt
SELECT max(column1) from my_table;
SPOOL OFF;

And this, is writting on the text file the "SELECT max(column1) from my_table;" and not the result of the query... Why?

Help please!

1 Answer 1

2

I assume you are using Sql Developer or Toad. I already answered this one. There is a difference between Run Statement and Run Script. Try Run Script.

Sign up to request clarification or add additional context in comments.

1 Comment

Run Script really does the trick as compared to Run Statement. Can anybody shed some light on this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.