Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL syntax (not familiar)
Message
From
04/08/2003 20:00:59
 
 
To
04/08/2003 19:27:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00816679
Message ID:
00816695
Views:
20
Awesome!!!

Thanks a alot for not only telling me the problem but also helping me to understand the theory around it.

Aloha,

James

>>Hi All,
>>
>>I'm not very familiar with SQL Syntax. I've been trying to figure out what's wrong with the following statement:
>>
>>
>>SELECT nixies, NixieEng, cnt(*) FROM DBF() ORDER BY nixies GROUP BY nixies
>>
>>
>>The field nixies is a c(30) field and NixieEng is a memo field. FoxPro keeps telling me that the 'GROUP BY clause is missing or invalid'.
>
>The problem is that any field not included in the GROUP BY is ambiguous: from which record of the group should VFP pick a value?
>
>VFP 6 and earlier ignored the problem, and picked some record, almost randomly (actually, the first or the last from the group, I am not sure which - but for practical purposes, this is almost as bad as picking a random value).
>
>VFP 7 (?) and later controls this more strictly. You can go back to the earlier behavior with SET ENGINEBEHAVIOR, but beware the potential ambiguity.
>
>>Also, what other SQL type functions are available other than cnt(*)?
>
>max(), min(), avg(), among others.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform