Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Ok... this is driving me nuts!
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);
SELECT ocrnr+1 INTO NOCRNR FROM parametrar FOR UPDATE; UPDATE parametrar SET ocrnr = ocrnr+1; COMMIT; RETURN (NOCRNR);
SELECT medlnr+1 INTO NMEDNR FROM parametrar FOR UPDATE; UPDATE parametrar SET medlnr = medlnr+1; COMMIT; RETURN (NMEDNR);
SELECT inbetnr+1 INTO NINBNR FROM parametrar FOR UPDATE; UPDATE parametrar SET inbetnr = inbetnr+1; COMMIT; RETURN (NINBNR);
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).
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
![]() |
![]() |