samedi 25 avril 2015

Get Remain of Account in Accounting software


I have a problem

SELECT Tbl_ZAsnad.zs_id ,
       V_ALLAccounts.h_name ,
       zs_bed ,
       zs_bes ,
       (SELECT SUM(Tbl_ZAsnad.zs_bed) - SUM(Tbl_ZAsnad.zs_bes) FROM Tbl_ZAsnad
        WHERE k_code = 12 and m_code = 2 and t_code = 10 and zsid < "***GET Current value of zs_id***")
FROM Tbl_ZAsnad , V_ALLAccounts
WHERE k_code= kid
and m_code = mid 
and t_code = tid
and k_code = 12 and m_code = 2 and t_code = 10  

I want to get current value of zs_id


Aucun commentaire:

Enregistrer un commentaire