Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Received / Outgoing Product
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 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01210081
Message ID:
01211409
Vues:
12
I had problems with the below code. For some reason, the NVL function may have given me incorrect resulting quantities. I am tearing this apart and will put it back together today. I think you are on the right track; it's just that I've never written code like the below; at least one part of it isn't working right yet.
SELECT ;
            cs.CustNo, ;
            cs.Customer, ;
            NVL(QtyIn, 000000), ;
            NVL(QtyOut, 000000), ;
            NVL(QtyIn, 000000)-NVL(QtyOut, 000000) As QtyDiff ;
         FROM Customer cs ;
         LEFT JOIN (SELECT cust, SUM(StandsIn) FROM StandsIn AS QtyIn GROUP BY 1) si ON si.cust = cs.custno ;
         LEFT JOIN (SELECT cust, SUM(SerialCnt) FROM Stands_Out AS QtyOut GROUP BY 1) so ON so.cust = cs.custno ;
         ORDER BY ;
            cs.Customer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform