Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Newbie, How to use procedure/function?
I downloaded a procedure package from
http://www.extracon.com/office/oworkdays.htm to allow me to calculate
first day of month. I run the sql script file to install it and it
seems to work as I get the msg "Package create" and "Package body
created". The question is how do I acces it from within my program?
One of the functions is defined as follows.
FUNCTION first_workday (p_date IN DATE,
p_unit IN VARCHAR2 := 'MON') RETURN DATE;PRAGMA RESTRICT_REFERENCES (first_workday, WNDS, WNPS);
Can I access it from SQL or can I only do that from PL/SQL? What is the syntax?
I tried "select first_workday(sysdate) from dual;" in sql. "vdate:=first_workday(sysdate);" and "execute first_workday(sysdate);" in PL/SQL but nothing seems to work. I always get syntax error. Any help appreciated. Received on Wed Feb 06 2002 - 11:42:57 CST
![]() |
![]() |