Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why result cursor is ordered?
Message
From
11/02/2005 09:38:58
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00985943
Message ID:
00985952
Views:
29
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform