Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax changes to Sql-Select
Message
 
 
To
11/02/2003 21:55:33
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00743031
Message ID:
00752132
Views:
20
>I'd love to know what happened ... the simplest GROUP BY clause fails with INVALID OR MISSING GROUP BY CLAUSE
>
>This fails:
>
>SELECT * FROM myfile INTO CURSOR mycursor GROUP BY 1
>
>OR EVEN
>
>SELECT * FROM myfile INTO CURSOR mycursor GROUP BY iapptid
>
>?????

John,
First off, don't do that!

What are you trying to accomplish in the SQL above? If you have the following table:
Field1   Field2    Field3
John     Smith     USA
John     Jones     Mexico
John     Wilson    Germany
In previous versions to 8, VFP would return the information in the record physically located last in the table. So you would get the following result:
John     Wilson    Germany
Is that what you want?

Other DBMS don't allow this. You must specify all fields that are not part of an aggregate function.

Having said all that, you can override VFP 8 and make it behave like VFP using the SET ENGINEBEHAVIOR command of the new SYS(3099,70) (7.0 compatibility). See the Help for more information.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform