Hello,
I have this unix script which selects rows from DB where current time is greater than expired time (column). So this will give all the records that are expired 1 day ago, 2 days ago, 3 days ago, etc.. I need help modifying in such that it should give records that are only expired 1 day ago (24-hour period)
#-------------------------------------------------------------
# Log into database and execute stored procedure
#-------------------------------------------------------------
sqlplus -S myLogin/myPwd@myServer >> /tmp/myLogFile << EOF
whenever sqlerror exit 1
set echo off
set pagesize 0
set feedback off
set trimout on
set trimspool on
set heading off
SPOOL /tmp/myExpiredList
select my_id, my_expr_tmstp from MY_SCHEMA.MY_TABLE where current_timestamp > my_expr_tmstp ;
SPOOL OFF
EOF
Thanks in advance - jak