Quantcast
Channel: Select Statement
Viewing all articles
Browse latest Browse all 9

Select Statement

$
0
0

Basically i want to create a view that calculate the stock end balance using moving average. On entry invoice the prg would create txn on a table item_txns that store all txns that affects the balance.

The problem is the sale txns only store the qty but does not store the cost of good sold. This would be calculated on the fly when users query and want to see the cost of good sold .

I want to do this using SELECT statement,

The fields are common for stock txns

date       itemid         txn_type          qty           cost

only sale txns does not have cost when sale is conducted.

i want to use Select statement that can calculate the Cost of Good Sold and Stock Balance


Viewing all articles
Browse latest Browse all 9

Latest Images

Trending Articles





Latest Images