|
-
Use a when-button-pressed trigger. You can put the PL/SQL block in the trigger (starting with DECLARE), or simply have a one line in the trigger:
insert_promoinfo;
If you do the one-liner, add a procedure in the program units except I wouldn't pass in parameters at this point (you can do that later when it works without them).
The insert_promoinfo procedure body would look like this:
PROCEDURE insert_promoinfo
IS
WF_ID varchar2(5);
OldGrade varchar2(2);
AdvancementDate date;
BEGIN
Select WORKFORCE_ID, Grade INTO WF_ID, OldGrade FROM Workforces
WHERE WORKFORCE_ID LIKE WrkFrc_ID;
AdvancementDate := Sysdate;
Insert into Advancements values (AdvancementDate,NGrade,'',OldGrade,WF_ID);
END;
However, if all you are doing is an insert into a table based on what is in two form fields at the time a button is pressed, why not do
insert into table_name values (:block_name.field_name1, :block_name.field_name2);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|