Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Toms
  Where is Toms?
 Hong Kong
 To: Mark Sheehan
  Where is Mark Sheehan?
 Indiana - United States
 Mark Sheehan
Subject: RE: HAving another SQL problem...
Thread ID: 15654 Message ID: 15702 # Views: 0 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Friday, September 27, 2002 3:57:47 PM         

In order to make it integrity, if you have an alias name after a table 'crsLoad LD', please
use the alias('LD') instead of tablename('crsLoad') in the WHOLE QUERY.
Dont sometimes use a tablename, sometimes use an alias.


> > The code below is not summing nPOWeight and POCtns for the same RN.cRun. I get a number but it is definitly not correct.
> > any idea or interpretation of the code below?
> >
> >
> > SELECT RN.cRun, SUM(csrLoad.nPOWgt) AS nRunWgt , SUM(csrLoad.nPOCtns) AS nRunCtns;
> >    FROM a_Run RN;
> >    INNER JOIN csrLoad LD;
> >    ON LD.cStore = RN.cStore;
> >       GROUP BY RN.cRun ;
> > 

> Try using the "LD" alias inside your SUM() instead of "csrLoad".
> Mark Sheehan


HAving another SQL problem... Posted by bleech67 toms @ 9/26/2002 9:20:12 PM
RE: HAving another SQL problem... Posted by Mark Sheehan @ 9/26/2002 9:52:32 PM
RE: HAving another SQL problem... Posted by Toms @ 9/27/2002 3:57:47 PM