Vince Teachout wrote:
> MB Software Solutions wrote:
>> Chester Friesen wrote:
>>   
>>> BTW, what does the 4 do after the Order By, also the 1 after the Desc?
>>>   
> 
> What Mike said.  I usually use the column names instead of the column 
> numbers, but there are a few places where you have no choice but to use 
> the numbers - in a UNION query, for example:
> 
> Select Foo, bar from MyJunk;
> UNION;
> Select Foo, bar from YourJunk;
> ORDER BY Bar, Foo    && Blows up
> 
> Select Foo, bar from MyJunk;
> UNION;
> Select Foo, bar from YourJunk;
> ORDER BY 2,1    && OK
> 

In SQLServer you could do :
select *
from (
 Select Foo, bar from MyJunk;
 UNION;
 Select Foo, bar from YourJunk;
 ) MyStuff
order by bar, Foo

But you can not do that in VFP 6. Is it possible in VFP 9?



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to