Skip to toolbar

Forum

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

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


Rahul U
Posts: 1
 Rahul U
Guest
(@Rahul U)
Joined: 2 months ago

Please check the attachment for additional information.

2 Replies
Sambit S
Posts: 41
 Sambit S
Guest
(@Sambit S)
Joined: 2 months 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
Rahul Updhyay
Posts: 17
(@rahul)
Active Member
Joined: 2 months ago

sir getting this error while compiling.

Reply

Leave a reply

Author Name

Author Email

Title *

Maximum allowed file size is 10MB

 
Preview 0 Revisions Saved
Share: