Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function returns error ORA 06571.
Message
 
 
Information générale
Forum:
Oracle
Catégorie:
PL/SQL
Divers
Thread ID:
00428405
Message ID:
00428535
Vues:
21
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;
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform