Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function returns error ORA 06571.
Message
From
12/10/2000 11:36:47
 
General information
Forum:
Oracle
Category:
PL/SQL
Miscellaneous
Thread ID:
00428405
Message ID:
00428535
Views:
23
Then I remove line with INSERT, function works.
I try select "spoziceID into lnSpoziceID from ..." with "for update nowait" without succes.


create or replace function kvak3
(lcPozice in char, lcDatum in char, lnHodnota1 in number, lnHodnota2 in number)
return number as lnUspech number :=-1;

Tally number :=0 ;
lnSpoziceID number :=0 ;
lnSdataID number :=0 ;
ldDatum date :=To_Date(lcDatum,'YYYYMMDD');
**** je v èíselníku pozic
begin
select count(*) into Tally from spozice where spozice.r_divID=4 and spozice.pozice=lcPozice ;
if Tally != 1 then
return -2;
end if;
**** èíslo pozice
select spoziceID into lnSpoziceID from spozice where spozice.r_divID=4 and spozice.pozice=lcPozice;
**** je v sdata ?
select count(*) into Tally from sdata where spoziceID=lnSpoziceID and datum=ldDatum ;"
if Tally=1 then
something ...
else
insert into sdata (sdataID,spoziceID,datum,hodnota1,hodnota2,NidZnak) values (sdataSEQ.NextVal,lnSpoziceID,ldDatum,lnHodnota1,lnHodnota2,USER);
something ...
end if;
end;
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform