Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ducks in a row
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00798105
Message ID:
00798109
Views:
17
>Hi All,
>I have a list of numbers. They are not numeric, just character. When I gather them in an SQL-select statement, they go in that funny order, i.e. 4017 will come right after 40169, etc. How would I the vales in there proper order? Don't say order by because that is what I am doing now.
>Thanks,

ALLTRIM() the character field then PADL() with zeros or spaces.

PADL(ALLTRIM(cNumber),11,'0')

HTH,
Randy Bosma
VFP - Because life is too short to code in something else...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform