sunhux
asked on
Sql script to spool / save to a disk file (in YYYYMMDD.spl) a select output
I'm no sql scripting person & need an sql script to
print out (ie save to disk file) the list of dormant
users from our Oracle DB for last 30 days:
select * from ACTION_LOG where ACTION_DTTM >= trunc(sysdate-30)
and ACTION_CD in ('SORAS') order by ACTION_DTTM DESC;
Will need someone to prefix it with
set spool .... DormantAccts_YYYYMMDD.spl
to save output to a spool file which we'll email out
print out (ie save to disk file) the list of dormant
users from our Oracle DB for last 30 days:
select * from ACTION_LOG where ACTION_DTTM >= trunc(sysdate-30)
and ACTION_CD in ('SORAS') order by ACTION_DTTM DESC;
Will need someone to prefix it with
set spool .... DormantAccts_YYYYMMDD.spl
to save output to a spool file which we'll email out
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've done it a few times.....
Small correction: You need two periods when using a variable like that:
spool DormantAccts_&dt..spl