Wednesday, July 27, 2011

SQL SELECT to fetch Voucher entries

Here's a SQL SELECT statement to fetch the Voucher entries (Financial details) only from various tables created by DX-Fusion utility :-

(: TO DO - Change the CompanyGUID below - a.companyguid='xxx' :)

SELECT all a.vchid,a.vchnumber,a.reference,a.vchdate,mv.name as vchtype,mv.parent as basevchtype,m.name as ledgername,v.amount
FROM vchled v,masterledger m,vchmain a,mastervouchertype mv
where a.companyguid='6f273852-3e2d-477b-9800-8d13d6fae87b' and v.ledgerguid=m.masterguid and
v.vchguid=a.vchguid and a.vchtypeguid=mv.masterguid

No comments:

Post a Comment