Charlie,

    Boy talk about lazy!!!

    Here is a function that we put into all of our DB's to convert our HP
TurboImage dates into Oracle format, you can modify to your hearts content.

create or replace FUNCTION Oracle_date(manman_date number) RETURN date IS
  odate date;
BEGIN
  if(manman_date <= 0) then odate := NULL;
  else odate := to_date(manman_date+2441255,'J');
  end if;
  return odate;
END;
/

grant execute on oracle_date to public;
create public synonym oracle_date for system.oracle_date;


Drop these into SYSTEM so that they come out when you do a full db export.

Dick Goulet

____________________Reply Separator____________________
Author: "Charlie Mengler" <[EMAIL PROTECTED]>
Date:       1/31/2001 2:07 PM

I could benefit from being able to "add" a new, homebrew SQL function into the
database.
I assume that it is possible; which might be incorrect.
Can someone point me any documention that explains how I could add my own SQL
function into the db?

I assume that some already has a PL/SQL function that accepts a Unix date/time
number
and returns an Oracle DATE variable. If anyone has code that does this, can you
please 
send me a copy?

TIA & HAND!
-- 
Charlie Mengler               Maintenance Warehouse  
[EMAIL PROTECTED]              10641 Scripps Summit Ct   
858-831-2229                  San Diego, CA 92131    
HOME DEPOT - The Big Boy's Toy store!!!!!!!!!!!!!!!!!
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Charlie Mengler
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to