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:
01211502
Vues:
12
At the risk of looking foolish (again),I'm not sure about the syntax error, but I would have expected a Column not found error.
LEFT JOIN ;
>			(;
>			SELECT Cust, SUM(StandsIn) As QtyIn ;
>				FROM StandsIn ;
>				GROUP BY ;
>					si.cust, ;
>					cs.customer ;
>			) ;
>			si ON si.cust = cs.custno ;
because both the si and cs alias from the group by clause are established outside the parens.



>I tried the following and I keep getting SYNTAX ERROR. Is there anything about the below SQL Statement that would cause that? I do not readily see any syntax errors. Would removing the NVL functions cause a syntax error?
>
>
>	SELECT ;
>			cs.custno, ;
>			cs.customer, ;
>			QtyIn As 000000, ;
>			QtyOut As 000000, ;
>			QtyIn - QtyOut As QtyDiff ;
>		FROM ;
>			customer cs ;
>		LEFT JOIN ;
>			(;
>			SELECT Cust, SUM(StandsIn) As QtyIn ;
>				FROM StandsIn ;
>				GROUP BY ;
>					si.cust, ;
>					cs.customer ;
>			) ;
>			si ON si.cust = cs.custno ;
>		LEFT JOIN ;
>			(;
>			SELECT Cust, SUM(SerialCnt) As QtyOut ;
>				FROM Stands_Out ;
>				GROUP BY ;
>					so.cust, ;
>					cs.customer ;
>			) ;
>			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