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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Ok... this is driving me nuts!

RE: Ok... this is driving me nuts!

From: Mercadante, Thomas F <Thomas.Mercadante_at_Labor.State.Ny.Us>
Date: Wed, 13 Feb 2002 07:52:39 -0800
Message-ID: <F001.0040DEAC.20020213065821@fatcity.com>

Stefan,

You cannot execute functions in that manner.

You can however, do :

select RAKNAUPP.FAKTURANUMMER from dual;

The problem is that the function is trying to return a value to you. When you try and CALL it, there is no place for the value to return to.

Hope this helps

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Wednesday, February 13, 2002 9:23 AM To: Multiple recipients of list ORACLE-L

I have the following package defined....

PACKAGE RAKNAUPP AS
FUNCTION FAKTURANUMMER RETURN NUMBER;
FUNCTION MEDLEMSNUMMER RETURN NUMBER;
FUNCTION OCRNUMMER RETURN NUMBER;
FUNCTION INBETNUMMER RETURN NUMBER;
END RAKNAUPP; PACKAGE BODY RAKNAUPP AS
FUNCTION FAKTURANUMMER
RETURN NUMBER
IS NFAKNR NUMBER(8);
BEGIN

        SELECT medlfaktnr+1 INTO NFAKNR FROM parametrar FOR UPDATE;
        UPDATE parametrar SET medlfaktnr = medlfaktnr+1;
        COMMIT;
        RETURN (NFAKNR);

END FAKTURANUMMER;
FUNCTION OCRNUMMER
RETURN NUMBER
IS NOCRNR NUMBER(6);
BEGIN
        SELECT ocrnr+1 INTO NOCRNR FROM parametrar FOR UPDATE;
        UPDATE parametrar SET ocrnr = ocrnr+1;
        COMMIT;
        RETURN (NOCRNR);

END OCRNUMMER;
FUNCTION MEDLEMSNUMMER
RETURN NUMBER
IS NMEDNR NUMBER(6);
BEGIN
        SELECT medlnr+1 INTO NMEDNR FROM parametrar FOR UPDATE;
        UPDATE parametrar SET medlnr = medlnr+1;
        COMMIT;
        RETURN (NMEDNR);

END MEDLEMSNUMMER;
FUNCTION INBETNUMMER
RETURN NUMBER
IS NINBNR NUMBER(6);
BEGIN
        SELECT inbetnr+1 INTO NINBNR FROM parametrar FOR UPDATE;
        UPDATE parametrar SET inbetnr = inbetnr+1;
        COMMIT;
        RETURN (NINBNR);

END INBETNUMMER;
END RAKNAUPP; It works fine, except when I try to run it with call:

call RAKNAUPP.FAKTURANUMMER;

Then I get:

ORA-06576: not a valid function or procedure name call <ERROR>'raknaupp.fakturanummer'

And I'm about at my wits end here... I can't for my life figure out why this isn't working as it is suposed to!

Could someone please figure out what I am doing wrong?????????

Stefan Jakobsson
stefan.jakobsson_at_areldata.se
Telefon: 08-470 24 00
Telefax: 08-470 24 24
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Stefan Jakobsson
  INET: stefan_at_areldata.se

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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: Thomas.Mercadante_at_Labor.State.Ny.Us
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 Feb 13 2002 - 09:52:39 CST

Original text of this message

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