Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting Question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00466702
Message ID:
00466725
Views:
9
>It looks like the sort is happening before the val conversion because negative numbers aren't at the top. Is there anything I can do in the SQL statement to make this work correctly?

Works fine for me:
CREATE CURSOR temp1 (cField c(10))
APPEND BLANK 
REPLACE cField WITH '3'
APPEND BLANK 
REPLACE cField WITH '2'
APPEND BLANK 
REPLACE cField WITH '-1'
APPEND BLANK 
REPLACE cField WITH '9'
SELECT VAL(cfield) as xyz FROM temp1 ORDER BY xyz
Shows, -1, 2, 3, 9 for me.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform