Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Dynamic spool file in SQL*Plus ?
Is it possible to set spool filename dynamic based on return value of SELECT
statement ?
I'd like to set spool filename the same as username to which I'm connecting:
Such statement don't work :-((
SELECT substr(user,1,8)||'.txt' INTO :uname FROM DUAL;
SPOOL :uname
-- script body
SPOOL off
--