Message
 
 
To
02/03/2010 09:16:56
General information
Fórum:
Visual FoxPro
Category:
Bases de dados, Tabelas, Views, Indices e SQL
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
ID da thread:
01451907
ID da mensagem:
01451974
Views:
68
>>In addition to Michel's observation, use field names in GROUP BY clause, not numbers.
>
>Are you saying this as a matter of Best Practice, or because it absolutley does not work in Sql Server?
>
>I just want to understand the context of your suggestion.
>
>
>On a related matter, I seem to recal a situation in VFP where you *have* to use numbers in either the Order or Group clause. Perhaps it was when doing a Union. I don't recall all the details.
>
>.

I think best practice is to use field names in SQL Server.

See also this very interesting story
http://bradsruminations.blogspot.com/2010/01/trolls-puzzle-sql-fable.html

In the UNION clause in VFP you have to use ordinals.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Responder
Mapa
View