Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL months in correct order
Message
 
To
04/08/2005 11:18:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01038533
Message ID:
01038541
Views:
19
One of the solutions could be like this:
sele *, iOrder(month_field) _order from .... order by _order


*-------------------
Procedure iOrder
Parameter pcMonth
do case
case pcMOnth="JAN"
    return 1
case pcMOnth="FEB"
    return 2

......
>Hi. I have stored months in my data as 'JAN','FEB','MAR', etc. Not so smart! Now I want to sort them correctly on my report. The question is How??
>
>Thanks, Randy
Previous
Reply
Map
View

Click here to load this message in the networking platform