Hi All,
I am writing a script in sqlplus which should have a header displayed with day yesterday's date and 28 days before with timestamp . I have written the script but i am not able to get it. My script
My script :
SET echo OFF ver OFF pages 0 trimspool ON feed OFF und OFF;
SET term OFF;
SET linesize 30000;
SET sqlblanklines ON;
SET WRAP OFF;
spool &3
prompt "Header" , &(Date -2) , &(timestamp -28)
prompt "Value"
select * from dual ;
spool off ;
exit ;
I should get output as
'Header' ,29-01-2022 , 03-01-2022 09:30:20
Value
X
Sysdate:31- Jan-2022 .
Please kind your advice.
Regards,
Uday