I have a scenario where in i should achieve the below.
if (bonusflag=FALSE)
insert into emp_sal select emp_no , no_of_hours*60 as emp_sal from emp
where no_of_hours = 4
IF(bonusflag=TRUE)
insert into emp_sal select emp_no , (no_of_hours*60) + 5000 as emp_sal from emp where emp_no >100 and no_of_hours > 6
Now, while doing the same thru pl/sql can you help me how to write the code as we can not use execute immediate because the above queries will return more than 1 row.
Thanks..
if (bonusflag=FALSE)
insert into emp_sal select emp_no , no_of_hours*60 as emp_sal from emp
where no_of_hours = 4
IF(bonusflag=TRUE)
insert into emp_sal select emp_no , (no_of_hours*60) + 5000 as emp_sal from emp where emp_no >100 and no_of_hours > 6
Now, while doing the same thru pl/sql can you help me how to write the code as we can not use execute immediate because the above queries will return more than 1 row.
Thanks..