save button [message #542033] |
Sat, 04 February 2012 01:20 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/c86fedf38fdae46febdd4144bf66e65d?s=64&d=mm&r=g) |
furqan
Messages: 115 Registered: January 2012 Location: Hyderabad
|
Senior Member |
|
|
hi
i have a save button in my form.on save button i have returned
when-button-pressed trigger.
update ship_dtl sd set sd.rec_qty = sd.rec_qty + :ship_dtl.rec_qty
where sd.mat_code = :ship_dtl.mat_code;
when iam entering a record first time its ok.second time with same
mat_code it is updating the rec_qty as well as adding a new record too.
please help.
|
|
|
|
|
|
|
|
|
|
Re: save button [message #542083 is a reply to message #542081] |
Sat, 04 February 2012 05:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ranamirfan
Messages: 535 Registered: January 2006 Location: Pakistan / Saudi Arabia
|
Senior Member |
![ranamirfan@gmail.com](/forum/theme/orafaq/images/google.png)
|
|
Quote:
i tried the your code...
but still the same..
first if i enter rec_qty=10
second if i enter rec_qty=2
third if i enter rec_qty=2
its showing 3 records
one with rec_qty=14
second with rec_qty=4
third with rec_qty=2
i want just want one record to be displayed with rec_qty=14
some problem in update query.
help me please
As my Understanding you have Master - Detail form.
Now you want to total receive qty.
Then You should make report for seeing total qty as following query.
Select Sum(Nvl(Rec_Qty,0)) Received_Qty ,Mat_Code
from Ship_Dtl
Group by Mat_Code;
Regards,
Irfan
[Updated on: Sat, 04 February 2012 05:28] Report message to a moderator
|
|
|
|
|
Re: save button [message #542218 is a reply to message #542101] |
Sun, 05 February 2012 23:42 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](//www.gravatar.com/avatar/c86fedf38fdae46febdd4144bf66e65d?s=64&d=mm&r=g) |
furqan
Messages: 115 Registered: January 2012 Location: Hyderabad
|
Senior Member |
|
|
Thanx sir...when you post this...reading your post i just got clicked and made some changes in tables and got it...
Thanx a lot irfan sir and littlefoot sir...
i really appreciate your help. thankx
|
|
|