Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for a better way
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00305584
Message ID:
00307812
Views:
15
I would use a lookup/reference table that contains a unique key and description. This should/could also be the basis of a combobox to populate the table.

You simply join the data table, and lookup table by the key and include the description in the field list.

>I am doing a SELECT - SQL command that gathers all of my data for my report. But is there a way within the SQL command that I can translate some of the data that has codes to represent data which is really strings of text?
>
>For example my report shows a column of codes as in 1, 3, 6, 4, 6
>1 = Ford
>2 = Chevy
>3 = Buick
>4 = Pontiac
>5 = Cadillac
>6 = Chrysler
>
>Is there an easy way during the SELECT to translate the codes on the fly so I don't have to play games in the report or before the report to translate the codes? So the word Ford prints instead of the code 1 and so on.
>
>I am simply looking for a shortcut or better way. Thanks for your able-bodied assistance ahead of time.
Previous
Reply
Map
View

Click here to load this message in the networking platform