PL/SQL Intervals are dizzy

From: Danes <sandra_danes_at_dangerous-minds.com>
Date: 25 Aug 2004 07:41:19 -0700
Message-ID: <662764.0408250641.1a1e60e9_at_posting.google.com>



Maybe I am just dizzy but I thought that 600 seconds is 10 minutes... Obviously not! Or maybe PL/SQL is just dizzy.

SQL> declare
  2 blah1 interval day to second := interval '600' second;
  3 blah2 interval day to second := interval '10' minute;   4 begin
  5 if blah1 <> blah2 then
  6 dbms_output.put_line('plsql is shit');   7 else
  8 dbms_output.put_line('maybe not');   9 end if;
 10 end;
 11 /
plsql is shit

PL/SQL procedure successfully completed.

SQL> declare
  2 blah1 interval day to second := interval '601' second;   3 blah2 interval day to second := interval '10' minute;   4 begin
  5 if blah1 < blah2 then
  6 dbms_output.put_line('plsql is really shit');   7 else
  8 dbms_output.put_line('maybe not');
  9 end if;
 10 end;
 11 /
plsql is really shit

PL/SQL procedure successfully completed.

SQL> Received on Wed Aug 25 2004 - 16:41:19 CEST

Original text of this message