Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This Select Group claims to be Missing or Invalid
Message
From
04/09/2007 22:01:39
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01252346
Message ID:
01252352
Views:
45
Hi Randy,
With "Set EngineBehavior 80/90" is necessary that ALL fields be in Group By clause and that Memo fields are not allowed.
For solve your problem, you can to do a "Set EngineBehavior 70" or you can to follow the rule above and you sould remove Memo's fields of Select clause and add the other fields (out Sum function) in Gorup By clause.
Good luck!


>The honor of your assistance is requested. I've spent too many hours looking at this SQL-select statement trying to figure out why "The GROUP BY clause is missing or invalid". In the first part, I've added the field type/size at the end of the line. This is generating a cursor for a report.
SELECT Brk_Name, Brk_Address1, Brk_Address2		, ; && C25 C30 C30
>	CtZ_CityName, CtZ_State, CtZ_PostalCode		, ; && C25 C2 C10
>	Brk_Contact, Brk_SingleMultiple			, ; && Memo I4
>	Brk_ShippingRate, Brk_ShippingRules		, ; && Y8.4 Memo
>	CtV_DisplayOrder, CSR_DisplayOrder		, ; && I4 I4
>	CtV_StoreName, CSR_CertificateAmount 		, ; && C25 Y8.4
>	SUM(COr_Amount) AS COr_Amount_SUM		, ; && Y8.4
>	CSR_\Discount, CSR_Percent, CSR_OrgPercent	; && N5.2 N6.2 N6.2
>FROM ST!CertificateOrder					;
>	JOIN ST!CertificateSizeRate ON COr_CSRFK==CSR_PK	;
>	JOIN ST!CertificateVoucher ON CSR_CtVFK==CtV_PK		;
>	JOIN ST!Broker ON CSR_BrkFK==Brk_PK			;
>	LEFT JOIN ST!CityZip ON Brk_CtZfk==CtZ_PK		;
>WHERE COr_OrCFK = '00054'					;
>ORDER BY Brk_Name, CtV_DisplayOrder, CSR_DisplayOrder		;
>GROUP BY Brk_SingleMultiple, Brk_Name				, ;
>	CtV_DisplayOrder, CSR_DisplayOrder			, ;
>	CtV_StoreName, CSR_CertificateAmount			, ;
>	CSR_BrokerDiscount, CSR_FamilyPercent, CSR_OrgPercent	, ;
>	Brk_Address1, Brk_Address2				, ;
>	CtZ_CityName ,CtZ_State, CtZ_PostalCode, Brk_ShippingRate ;
>INTO CURSOR rc_OrderTabReport
>It works as expected without the SUM() and GROUP BY. I've made sure all the non-grouped fields are included and that there are no memo fields in the GROUP BY. Can you see what I've missed?
>
>TIA,
Erick
Força Sempre!
Strength Always!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform