CREATE PACKAGE journal_entries AS PROCEDURE journalize (amount NUMBER, trans_date VARCHAR2); PROCEDURE journalize (amount NUMBER, trans_date NUMBER ); END journal_entries; CREATE PACKAGE BODY journal_entries AS PROCEDURE journalize (amount NUMBER, trans_date VARCHAR2) IS BEGIN INSERT INTO journal VALUES (amount, TO_DATE(trans_date, 'DD-MON-YYYY')); END journalize;
PROCEDURE journalize (amount NUMBER, trans_date NUMBER) IS BEGIN INSERT INTO journal VALUES (amount, TO_DATE(trans_date, 'J')); END journalize; END journal_entries;
The first procedure accepts trans_date as a character string, while the second procedure accepts it as a number (the Julian day). Yet, each procedure handles the data appropriately.