Question

How can I spool SQL query log to a file using SQLExecutor?

  • 19 October 2016
  • 6 replies
  • 0 views

Badge


6 replies

Badge

 

example of how I'd like to spool an sql statment to a file:

 

spool "C:\\Users\\test.txt"

 

Userlevel 4

You could construct the SQL to execute in an attribute (or a private parameter) and send the query to the Logger before the SQLExecutor.

Userlevel 2
Badge +17

You could construct the SQL to execute in an attribute (or a private parameter) and send the query to the Logger before the SQLExecutor.

Agreed. The AttributeFileWriter might also be an option if you want to write the SQL statement only. e.g.

 

Badge

I don't quite get this! It does not log the result of the query ?

Userlevel 4

I don't quite get this! It does not log the result of the query ?

What do you want to log, the query or the results?

 

 

Userlevel 2
Badge +17

I don't quite get this! It does not log the result of the query ?

Naturally it will not save the result from the query. It just saves the SQL statement into a file.

 

Perhaps did you mean the Oracle SPOOL command? If so, unfortunately it seems that there is no way to execute the command with the SQLExecutor. Consider using the CSV writer, if you want to save the query result into a text file.

 

Reply