|
Replacing display values |
Top Previous Next |
|
SQL provides a function called CASE. It allows the result of a column to be determined by a the results of a case expression. For example ServType variable returns A, N or C according to the service type (AI, natural mating or combination, respectively). If you want to display a readable text instead of the service type code: SELECT
Another example, the Score variable contains the score entered in the Physical Condition event. It is a numeric value, in this example from 0 to 100. You can assign a text category according the number, for example 0-49: bad, 50-79: good, 80-100: excellent. The sql statement would be: SELECT
See any SQL manual for more information.
|