Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to do a weird ordering of data
Message
From
14/05/2011 08:55:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01510568
Message ID:
01510674
Views:
47
>Actually, the field is named RELATECD and the values are E1, S1, C1, C2, C3, and so on. I can give that a shot and see how it comes out.
>Thanks!
>Cecil

How about:
SELECT *, CAST(AT(relatecd + ",", "E1, S1, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10") AS I) AS OrderField;
  ORDER BY OrderField
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform