the
entire thing :)
/Stefan
-Ursprungligt meddelande-
Från: Mercadante, Thomas F
[mailto:[EMAIL PROTECTED]]
Skickat: den 13 februari 2002 15:58
Till: Multiple recipients of list ORACLE-L
Ämne: RE: Ok... this is driving me nuts!
Stefan,
You cannot execute functions in that manner
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
The first thing that strikes me is that you seem to be calling a function
like a procedure. Try v_somenumber := RAKNAUPP.FAKTURANUMMER.
HTH! GL!
Rich Jesse System/Database Administrator
[EMAIL PROTECTED] Quad/Tech International, Sussex, WI USA
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
Stefan,
try following in sqlplus ...
set serveroutput on
declare
n_num number;
begin
n_num := raknaupp.fakturanummer;
dbms_out.put_line(to_char(n_num));
end;
/
PS: Tom, this function does a UPDATE and COMMIT, so it can NEVER be used in
DML statement as it violates the purity
Title: RE: Ok... this is driving me nuts!
i can't really remember the call command in pl/sql.
where do you call it from? if you are in a pl/sql block
you don't need a call but you might want to assign the
return value to a variable! in sql*plus you need to assign
the return value