Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Order By in a Union
Message
From
04/05/2009 00:47:13
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01397707
Message ID:
01397712
Views:
49
>Try with
>
>...
>ORDER BY 1
>
Yep, that does it. I had tried that already today, with no luck...But, when you suggested it, I went back and tried some more things:

You see, the case is tricky because I must eval it since the user may have chosen to sort by another column. There are actually more columns than what I showed in my example code. I just posted a simpler version to make it easy to see the problem.

It's pretty much all eval'd. (See code below.)

Any way, when I tried earlier, I had set the Form property that controls this to '1', which did not work, but I finally realized that I had to enter ='1' into the Property Sheet, then it started working!

Here is the actual code, where you can see all the evals:
   *-- Pull template structure and then local child records 
   Select * From &lcTemplate where 1=2 Into cursor &lcDiskFile; && Just gets the structure, no records
    Union All;
     Select &lcCopyFlds;
      From &lcChildAlias with (BUFFERING=.T.);
      Where &lcCriteria;
      Order By &lcChildOrderField
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform