Operating System - HP-UX
1753444 Members
4894 Online
108794 Solutions
New Discussion юеВ

why only 1 of the 2 tables that i specified to the insertion of the data?

 
SOLVED
Go to solution
Deanna Tran_1
Frequent Advisor

why only 1 of the 2 tables that i specified to the insertion of the data?

this is the script that I use?



create PROCEDURE tester1 IS
numcount number:=0;
begin
while true loop
numcount:=numcount+1;
insert into employee1 values (numcount,'lkjljf','dlkjdeann',87970.80);
insert into employee value (numcount, 'dkjl','dlakdjfelsdjfe',10000,90);
update employee1 set salary = salary + 900
where empid = numcount;
update employee set salary = salary + 10000
where empid = numcount;
update employee set salary = salary + 5000
where empid = numcount;
update employee set lastname = 'dkvnlkdoije'
where empid = numcount;
commit;
end loop;
END;
/
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: why only 1 of the 2 tables that i specified to the insertion of the data?

insert into employee1 values (numcount,'lkjljf','dlkjdeann',87970.80);
insert into employee value (numcount, 'dkjl','dlakdjfelsdjfe',10000,90);

If I assume that tables employee and employee1 have the same schema, you are passing 4 arguments into one and 5 into the other. Also,
you uses VALUE rather than VALUES in one statement.

If it ain't broke, I can fix that.
Deanna Tran_1
Frequent Advisor

Re: why only 1 of the 2 tables that i specified to the insertion of the data?

thanks...I have make those changes...but still was unsuccesful?
A. Clay Stephenson
Acclaimed Contributor

Re: why only 1 of the 2 tables that i specified to the insertion of the data?

Without seeing your error conditions, I have no idea. You are aware that you have an endless loop? You should probably have something like while numcount <= 100.

If it ain't broke, I can fix that.
Deanna Tran_1
Frequent Advisor

Re: why only 1 of the 2 tables that i specified to the insertion of the data?

hi..thanks...i am aware that i infinite loop...and I did figure it out what was the errors...it was the typo...and now it works fine...thanks again...for helping me