Forum

Create a PL/SQL Tri...
 
Share:
Notifications
Clear all

Create a PL/SQL Trigger to display the message "Re-Order Level reached for the item-item name"


Posts: 1
Guest
Topic starter
(@Rahul U)
New Member
Joined: 4 years ago

Create a PL/SQL Trigger to display the message "Re-Order Level reached for the item-item name", whenever an item quantity reaches 10 and below while updating for inserting an item.

Please check the attachment for additional information.

2 Replies
Posts: 47
Guest
(@Sambit S)
Eminent Member
Joined: 4 years ago

You can try this and let me know. 

Create or replace trigger threshold
On Stock
Before insert or update
For each row
Is
V_qty number;
V_desc varchar2(30);
Begin
Select quantity, description into v_qty, v_desc
From stock
Where itemid = :new.itemid;

If v_qty < 10 then
Dbms_output.put_line(' Re-order level reached to the item: '||v_desc);

End;

Reply

Self Learning Video Tutorials - Software Course

Posts: 17
(@rahul)
Active Member
Joined: 4 years ago

sir getting this error while compiling.

Reply

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: