Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Order By on a String
Message
 
To
17/09/2003 10:23:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00829868
Message ID:
00829878
Views:
17
>I need to find badge numbers in order. I do select... Order on badgeno. The badgeno is a charactor, 'CNT1','CNT2','CNT3',...'CNT20'. It sorts as CNT1,CNT10,CNT2,CNT20. How can I get this in a numerical order?

Something like
SELECT MYFIELD, VAL(SUBSTR(MYFIELD, 4)) AS Ord;
  FROM Mytable;
  ORDER BY Ord;
  INTO CURSOR...
works
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform