Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters for Order by in SQL?
Message
From
29/08/1998 13:49:27
 
 
To
28/08/1998 13:24:09
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00131023
Message ID:
00131279
Views:
21
>>>Sinppage
>>>>
>>>>Just my .02 (US) here. I'd opt for names. I think it's more flexible. Using the field number ties query to the order of the field within the table. If the structure changes, say a new field is inserted, then this would have to change too. Using the name doesn't have this problem.
>>>
>>>George,
>>>
>>>While I always prefer names too, I have had many cases where the field number was the only way to get an ORDER BY to work!
>>>
>>>Cheers,
>>>
>>>Jim N
>>
>>Hidy Jim,
>>
>>The only place that I *think* (I'm sticking my neck out here) that I've run into that was in doing a SELECT..FROM...UNION ALL... situation, where fields were re-named. Since, however, I had control over the order of the fields, I don't think it applies to this case. However, if you've encountered it elsewheres, I'd be glad to hear about it.
>
>You probably saw, that I retyped some explanation from VFP Help. When you use field name Fox takes order from source tables (and confuses if you UNION different ones), when you use numbers Fox check result table.

Ed -

Thanks for this refined distinction on the difference. It's a good one to keep in mind.

Sylvia
Previous
Reply
Map
View

Click here to load this message in the networking platform