Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ora-01403

Status
Not open for further replies.

silvija

Programmer
Sep 17, 2002
1
MK
PROCEDURE in_rabm(pred_dat in date ,edinica in varchar2,rett out number) is
oper number;
mesec date;
t_edb varchar2(13);
t_status varchar2(1);
t_rabvreme varchar2(1);
t_funkcija varchar2(1);
t_sindikat varchar2(1);
t_sistemat varchar2(1);
t_lokacija varchar2(2);
t_pedin varchar2(3);
t_osnbod number;
t_dopbod number;
t_procmt number;
t_bodmt number;
t_danok varchar2(1);
t_prid varchar2(1);
t_hrana varchar2(1);
t_prevoz varchar2(1);
t_fiksna varchar2(1);
t_hranat varchar2(1);
t_prevozt varchar2(1);
t_ucpod varchar2(2);
t_ucpods varchar2(2);
t_tipisplata varchar2(2);
t_banka varchar2(3);
t_teksted varchar2(20);
row_num number;
broj number;
begin

rett:=0;
loop

select edb,
status,
pe_edin,
lokacija,
rab_vreme,
funkcija,
osn_bod,
dop_bod,
procent_mt,
bod_mt,
uc_pod,
uc_pods,
sindikat,
tip_isplata,
banka,
tek_sted,
danok_dn,
pridones_dn,
tip_hrana,
tip_prevoz,
fiksna_bod,
hrana_tek,
prevoz_tek
into
t_edb,t_status, t_pedin,t_lokacija,t_rabvreme,t_funkcija, t_osnbod,
t_dopbod, t_procmt,t_bodmt,t_ucpod, t_ucpods,t_sindikat,
t_tipisplata, t_banka,t_teksted, t_danok, t_prid,t_hrana,
t_prevoz, t_fiksna,t_hranat,t_prevozt
from rabmes where za_mesec =pred_dat and edinica=:global.edinica;
mesec:=to_date(pred_dat,'dd.mm.yyyy');
insert into rabmes (za_mesec,edb,edinica, status,pe_edin,lokacija,
rab_vreme,funkcija,osn_bod, dop_bod, procent_mt,
bod_mt, uc_pod, uc_pods,sindikat,operator,
tip_isplata,banka,tek_sted,danok_dn,pridones_dn,
tip_hrana,fiksna_bod,hrana_tek,prevoz_tek)
values (mesec,t_edb,:global.edinica, t_status, t_pedin,t_lokacija,
t_rabvreme,t_funkcija, t_osnbod, t_dopbod, t_procmt,
t_bodmt,t_ucpod, t_ucpods,t_sindikat, oper,
t_tipisplata, t_banka, t_teksted, t_danok, t_prid,
t_hrana,t_fiksna, t_hranat,t_prevozt);

select rownum into broj from rabmes where za_mesec = pred_dat and edinica=:global.edinica;

if row_num=1 then
rett:=rett +1;
end if;

end loop;

end ;
 
I see that row_num is always 0, it is only declared.

Hehenka
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top