home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,668 of 2,288   
   Frank van Bortel to Danes   
   Re: PL/SQL Intervals are dizzy   
   26 Aug 04 09:30:18   
   
   From: fvanbortel@netscape.net   
      
   Danes wrote:   
      
   > 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>   
      
   If I understand correctly, you must do the math   
   yourself (from the SQL Reference, on Interval):   
      
   The valid range of values for the trailing field are as follows:   
      
   HOUR: 0 to 23   
   MINUTE: 0 to 59   
   SECOND: 0 to 59.999999999   
      
   Although I get it to work with less than 100 seconds as well...   
   Just print blah1 (it's 0 when greater than 99 specified)   
      
   Also, I tested with 9.2.0.4, which seem to have some bugs   
   (many examples did not work...) in this area   
   --   
      
   Regards,   
   Frank van Bortel   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca