how could I select the name of my spool filename from a table in sqlplus?
I have something like:
SPOOL ON
SPOOL XXXXXXXXX.bkp
SELECT * FROM my_table WHERE field1='value';
SPOOL OFF
And want the XXXXXXXXX.bkp to have the value of a field from this same table.
Regards, Fernando
You can use the SQLPLUS "new_value" feature to save the column value into a sqlplus variable and then spool it as below.
And here are the contents from my spool file.
You might also want to look at the UTL_FILE Package and its subprograms if you need greater control over your writing to files.