Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re:A couple of questions from a lazy DBA
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____________________Subject: A couple of questions from a lazy DBA Author: "Charlie Mengler" <charliem_at_mwh.com> 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 charliem_at_mwh.com 10641 Scripps Summit Ct 858-831-2229 San Diego, CA 92131 HOME DEPOT - The Big Boy's Toy store!!!!!!!!!!!!!!!!!
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: ListGuru_at_fatcity.com (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). Received on Wed Jan 31 2001 - 16:31:10 CST
![]() |
![]() |