Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Newbie, How to use procedure/function?

Newbie, How to use procedure/function?

From: miker <mdent12_at_none.com>
Date: Wed, 06 Feb 2002 17:42:57 GMT
Message-ID: <5dq26u0fdl78up8a42691qnbgiv7qam4v4@4ax.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US