Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Having Trouble with Group By in VFP 9
Message
 
 
To
16/03/2006 14:37:01
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01105032
Message ID:
01105035
Views:
24
You've to include all non-aggregate fields into GROUP BY, enclose them into agregate functions MIN()/MAX() or remove them from the colimn list. It's documented in VFP9 help under SET ENGINEBEHAVIOR and in INFO: SQL SELECT Behavior Changes in Visual FoxPro 8.0 mskb #813361.


>I am working with an application written in VFP 6 and keep running into problems with sql statements containing a Group By clause. I haven't found a common denominator. Any ideas?
>
>Here is an example cut from the code:
>
>
>SELECT ;
>     receipt.rec_date,receipt.receipt_no, paidinv.inv_no, ;
>     receipt.type, receipt.card_no, receipt.exp_date, ;
>     receipt.amount, receipt.country, receipt.exch_rate ;
>	WHERE receipt.type $ "AMV" .and. receipt.rec_date = date() ;
>        FROM receipt ;
>	INNER JOIN paidinv ON receipt.receipt_no = paidinv.receipt_no ;
>        Group By Receipt.receipt_no ; 	
>        ORDER BY type ;
>	INTO CURSOR dispcred
>
>
>Thanks, Jeffrey
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform