Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why result cursor is ordered?
Message
De
11/02/2005 09:38:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00985943
Message ID:
00985952
Vues:
30
AFAIK you get the records in 'natural' order if you don't specify any order. With natural order I mean in the same order as they are in the 'from' table.

>I have the following select:
>
>
>SELECT PADR("Activity",20," ") AS Name ,  99 AS Nomer FROM Funds  WHERE Kod == 1;
>       UNION SELECT SPACE(20)  AS Name,   00 AS Nomer FROM Funds  WHERE Kod == 1;
>       INTO CURSOR cAttr1
>
>
>But the result cursor is ordered:
>
>* I Expect
>Name            Nomer
>-------------   ------
>"Activity   "       99
>"           "        0
>
>
>*** The Result ????????????????
>Name            Nomer
>-------------   ------
>"           "        0
>"Activity   "       99
>
>
>I have no ORDER BY clause
>
>There is no difference if I change the SELECT to this:
>
>
>SELECT SPACE(20)                            AS Name,   00 AS Nomer FROM Funds  WHERE Kod == 1;
>       UNION SELECT PADR("Activity",20," ") AS Name ,  99 AS Nomer FROM Funds  WHERE Kod == 1;
>       INTO CURSOR cAttr1
>
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform