Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Received / Outgoing Product
Message
De
30/03/2007 10:35:25
 
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:
01210351
Vues:
14
Hi Cecil,

PMFJI, but with the error you get and what I see, the problem may be with your On string. Try,
...
                 LEFT JOIN StandsIn si ON si.cust = cs.custno ;
                  LEFT JOIN Stands_Out so ON so.cust = cs.custno ;
...
>Hi Sergey,
>
>I am not very good at these SQL statements as can be seen below:
>
>
>SELECT ;
>    Cust, Customer, QtyIn, QtyOut, QtyIn-QtyOut As QtyDiff ;
>      FROM ( ;
>         SELECT ;
>            CustNo As Cust, ;
>            Customer, ;
>            SUM(si.StandsIn) AS QtyIn, ;
>            SUM(so.SerialCnt) As QtyOut ;
>               FROM Customer cs ;
>                  LEFT JOIN StandsIn si ON si.cust = cs.cust ;
>                  LEFT JOIN Stands_Out so ON so.cust = cs.cust ;
>               GROUP BY ;
>                  Cust, ;
>                  Customer ;
>       ) dt1;
>*WHERE QtyOut > QtyIn ;
>
>"CustNo" is the name of the Customer ID in the Customer table; elsewhere it is "Cust".
>
>I get the following error: "SQL: Column 'Cust' is not found."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform