Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Received / Outgoing Product
Message
 
 
To
30/03/2007 10:35:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01210081
Message ID:
01210358
Views:
12
Good catch, Beth! I only noticed the problem with group by, though here I may be wrong.

>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."
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform