I have a float column called "weight". It's default is -1, showing the object wasn't weighted. Is it possible to show string "unweighted" instead of any negative number in the field?
As it is internally stored:
________________________
| object_id | weight |
|____________|___________|
| 1 | 12.4 |
| 2 | 7.5 |
| 3 | -1 |
|____________|___________|
And now how the table should appear to the user:
________________________
| object_id | weight |
|____________|___________|
| 1 | 12.4 |
| 2 | 7.5 |
| 3 |unweighted |
|____________|___________|
The table with the combined float/text column can be a view; still, I have no idea how to do it. Is it possible, or is doing the translation (negative number -> 'unweighted') on client side my only option?