Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by clause error in sql with NO group by clause
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00801354
Message ID:
00801357
Views:
12
> SELECT SUM(aTmpData.nBegin), ;
> SUM(aTmpData.NADDS),;
> SUM(aTmpData.nNew) , ;
> (aTmpData.nRein0 + ;
> aTmpData.nRein30 + ;
> aTmpData.nrein90 + ;
> aTmpData.nrein91 + ;
> aTmpData.nrein181), ;
> SUM(aTmpData.nRein0), ;
> SUM(aTmpData.nRein30), ;
> SUM(aTmpData.nrein90), ;
> SUM(aTmpData.nrein91), ;
> SUM(aTmpData.nrein181), ;
> SUM(aTmpData.nterms), ;
> SUM(aTmpData.nLOE), ;
> SUM(aTmpData.nRiteShare), ;
> SUM(aTmpData.nOther), ;
> SUM(aTmpData.nEnd), ;
> SUM(aTmpData.nSwitchout) ;
> FROM aTmpData ;
> WHERE aTmpData.cSite = junk.cSite ;
> AND aTmpData.ddate = aDatelist(i2-1,1) ;
> INTO TABLE dkstep1
>
>and even though there isn't a group by clause I am getting the group by
>clause missing or invalid with it

Because the GROUP BY clause is missing. :-) You have one "field" in there that isn't an aggregrate -- you need to group on it, or the SELECT won't work.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform