Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Order By in a Union
Message
De
04/05/2009 00:47:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01397707
Message ID:
01397712
Vues:
51
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform