Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Received / Outgoing Product
Message
From
30/03/2007 10:57:24
 
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:
01210373
Views:
14
Thank you. :-)
I have done it before, that is why I saw it that way. The group by went waaaay over my head. lol.

>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."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform