Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Balance amt using SQL from Parent-Child and GrandMaster
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00966900
Message ID:
00967043
Vues:
13
Hi Sergey

Thanks for your reposne, here is what I did. I adapted and ran your eg as below right in the FireBird backend.
SELECT t.iID, t.iNo, t.dDt,
        s.bDrAmt - uf.bDr + ut.bCr AS bBalDr,
        s.bCrAmt - uf.bCr + ut.bDr AS bBalCr
    FROM tAccountsJV t
    JOIN sAccountsJV s
        ON s.iPID = t.iID
            AND s.iAcctID = 485
    LEFT JOIN uOSAccounts uf
        ON uf.iPID = t.iID
    LEFT JOIN uOSAccounts ut
        ON ut.iSID = t.iID
The problem now arises is that I receive null as values bBalDr and bBalCr, for both the records returned. I checked individual values, ut.bCr and utbDr are null in first case (ie. 60-60) and uf.bDr and uf.bCr are null in the second case (ie. 100-60).

Please advise in avoiding null values.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform