comparing a DATE column with "one minute ago", type warning?
From: <mh_at_pixar.com>
Date: Thu, 09 Oct 2008 00:12:25 GMT
Message-ID: <J%bHk.498$8_3.7@flpi147.ffdc.sbc.com>
Date: Thu, 09 Oct 2008 00:12:25 GMT
Message-ID: <J%bHk.498$8_3.7@flpi147.ffdc.sbc.com>
How should I be comparing a DATE column with "one minute ago"?
I do this:
select sysdate, sysdate- interval '1' minute from dual;
and get just what I need, the time a minute ago:
SYSDATE SYSDATE-INTERVAL'1'MINUTE ------------------------- ------------------------- 08-OCT-08 17:09:19 08-OCT-08 17:08:19
But in my PL/SQL, I get a warning on this code, where lastping is a DATE column:
update mytable set status='silent' where lastping < (sysdate - interval '1' minute); ^ ^ col 28 col 36 Warning(16,28): PLW-07202: bind type would result in conversion away from column type Warning(16,36): PLW-07202: bind type would result in conversion away from column type
Many TIA!
Mark
-- Mark Harrison Pixar Animation StudiosReceived on Wed Oct 08 2008 - 19:12:25 CDT