i am working in oracle forms with schema Scott and i want to make another block to view the grade for each employee based on every employee salary from employee table and salary range from salary grade table how could i do it ?
You can create two Data Blocks
for emp
and salgrade
tables with Data Block Wizard
[ those ( emp
and salgrade
) may be left as block names, also ].
Add this string :emp.sal between losal and hisal
into WHERE Clause
of salgrade block.
And then create a WHEN-NEW-ITEM-INSTANCE
trigger at block level for emp
with the code below :
go_block('salgrade');
execute_query;
go_block('emp');
Whenever a query executed in the emp
block, a query synchronously executed for salgrade
block that brings the range for the grades matching with salary
column of emp
.