Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing table
Message
From
08/05/2002 09:49:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
08/05/2002 09:43:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00653959
Message ID:
00653964
Views:
16
>>I have a field containing records like the following:
>>
>>AA,AA,AA,BB,BB,DD,EE,EE,EE,EE,EE,FF,FF,FF
>>
>>
>>If I order them they come out as above.
>>
>>I need say the FF to come before the EE, and the rest to stay the same.
>>
>>Anyone any ideas how this could be done.
>
>See chrtran() and strtran(). You could also use a lookup table.
>
>If you explain why you to do this, we might give more specific suggestions.
>
>Hilmar.

For more complicated conditions, you could create a UDF that returns the value you want, perhaps with a DO CASE. Be sure to return a value of fixed size (see padr()).

The UDF must be always accesible when you do changes in the table - perhaps the best place to store it is in the DB stored procedures.

Hilmar.
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