Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Please help me. I am getting error while running the following Oracle 11.2g SQL code:

User_6TYJGSep 30 2021

DECLARE
x NUMBER := 0;
iSalary Number;
iAllowance Number;
BEGIN
iSalary := 585.90;
iAllowance := 58.59;
LOOP
x := x+1;
INSERT INTO EmployeeTab (BasicSalary)
select CASE WHEN GL = 'L'||x THEN 23 + (iSalary*(x-1)) END
FROM EmployeeTab;
INSERT INTO EmployeeTab (BasicAllowance)
select CASE WHEN GL = 'M'||x THEN 32 + (iAllowance*(x-1)) END
FROM EmployeeTab;
IF x > 14 THEN
EXIT;
END IF;
END LOOP;
END;

This post has been answered by BluShadow on Sep 30 2021
Jump to Answer

Comments

Post Details

Added on Sep 30 2021
5 comments
140 views