Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL syntax (not familiar)
Message
De
05/08/2003 17:33:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
04/08/2003 20:00:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00816679
Message ID:
00817095
Vues:
21
>Awesome!!!
>
>Thanks a alot for not only telling me the problem but also helping me to understand the theory around it.

You are welcome. I am glad to be of help.

>
>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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform