Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Select statement does not work in Sql Server
Message
 
 
To
02/03/2010 09:16:56
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01451907
Message ID:
01451974
Views:
66
>>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
Reply
Map
View

Click here to load this message in the networking platform