How to Get Sum Of Tubular Form Column [message #120861] |
Tue, 24 May 2005 05:54 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
weekend79
Messages: 198 Registered: April 2005 Location: Islamabad
|
Senior Member |
![halfday_79%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
Summery Of Problem
How to calculate the sum of all values of a column in a “child tabular” form and assign sum to a field of parent table?
+ How to call the values of a tabular column (i.e. in simple for we call item as :Block_Name.Item_Name) but if a tabular column has 5 or n number of values in how to call?
Details Of Problem
Tbl_Master /*layout = form*/
Col_Date
Col_TotalPrice
Tbl_Child /*layout = tabular*/
Col_ItemName
Col_ItemPrice
I want to assign sum of all Col_ItemPrice to Col_TotalPrice.
I put a Post_Item trigger to Col_ItemPrice it work as set Col_Total := (NVL(Col_TotalPrice,0) + (Col_ItemPrice)).
It work well but it is not fool proof as if user update any value of Col_ItemPrice before save the Col_TotalPrice increase from actual sum.
So can some one give me a fool proof solution?
Wishes
Jawad
|
|
|
|
|
|
|
|
|