Contact Us  |  Ask for Pricing  |  Partners

The World's Fastest Storage®
 

superSSD > Education > Oracle Performance Center > Code List

Oracle Performance Center - Code List

 
--------------------------------------------------------------------------------
--  FUNCTION DEC_SECONDS
--
--  Purpose      used to calculate the number of seconds between two timestamps
--  Limitations  This does not support timestamps that cross months
--  Version 1.0
--  Oracle Version 10.2
--  Date 19 Oct 2007
--
--  Disclaimer This source code is provided free by Texas Memory Systems. This 
--             software is provide without support, and the user assumes all 
--             risk in it's use. You may use, or modify this in any way that 
--             you choose
--------------------------------------------------------------------------------
create or replace function dec_seconds( begin_time  in timestamp,
                           end_time   in timestamp)
return number
is
  var_day number;
  var_hou number;
  var_min  number;
  var_sec  number;
begin
  select extract(day from end_time - begin_time) 
    into var_day 
    from dual;
  select extract(hour from end_time - begin_time) 
    into var_hou 
    from dual;
  select extract(minute from end_time - begin_time) 
    into var_min 
    from dual;
  select extract(second from end_time - begin_time) 
    into var_sec 
    from dual;
  return ((var_day * 86400 ) + (var_hou * 3600) + (var_min * 60) + var_sec);
end dec_seconds;    
/               

Texas Memory Systems Sales - Call (713) 266-3200

Sign up for the RamSan Mailing List

Home  |  Company  |  Products  |  Support  |  Resources  |  Partners
 Contact Us  |  Legal  |   Library  |  Press  |  Success Stories  |  Privacy Policy

Copyright © 2006 Texas Memory Systems. All Rights Reserved.