-
When i enter quantity it should display total
There is a menu contains fields: Item_id, Description, Rate, Quantity and Total.
=> Item_id contains 5 items.
=> rate and discription can be changed any time.
now Question is when i enter quantity it should display total (formula)
and suppose i choose 5 items and i enter quantities it shoud give me the total bill (Summary)
Which triggers I can use to accomplish this task. and suppose I change the rate and discription what will happen?
Question asked by visitor Manikumar
-
Re: When i enter quantity it should display total
no need to write triggers for this purpose.
Triggers are written to implement some business logic .
U can write a procedure for the purpose.
-
Expert Member
Re: When i enter quantity it should display total
you should use "before insert" trigger the statement you need to use would be like,
:new.total := :new.rate * :new.quantity;
But in ur case there is no need to use trigger itself. The following insert statement is sufficient,
insert into item_table(Item_id, Description, Rate, Quantity,Total)
values (lv_Item_id, lv_Description, lv_Rate, lv_Quantity ,lv_Rate * lv_Quantity)
Hope this helps
-
Re: When i enter quantity it should display total
Thats wha i have suggested.
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