Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why result cursor is ordered?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Why result cursor is ordered?
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00985943
Message ID:
00985943
Views:
64
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
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Next
Reply
Map
View

Click here to load this message in the networking platform