Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create function tpb_hitung_saldo_awal (transaction_id integer, product_id integer, locator_id integer)
- returns integer as $func$
- begin
- return (
- select sum(movementqty) into qty from m_transaction mt
- where m_transaction_id <= transaction_id
- and m_product_id = product_id
- and m_locator_id = locator_id
- );
- end $func$
- LANGUAGE PLPGSQL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement