T
Tor Inge Rislaa
I have an simple query as below:
SELECT MyValue
FROM MyTable
Based on the value in the field MyValue I want to add a value to a new
column in the result of the query.
Example:
If the value in MyValue = 0 then I would add the text "External"
If the value in MyValue = 1 then I would add the text "Internal"
I what to see the same result as the query below (on the fly), without using
union all:
SELECT MyValue, "External" AS ValueDescription
FROM MyTable
WHERE MyValue = 0
UNION ALL
SELECT MyValue, "Internal" AS ValueDescription
FROM MyTable
WHERE MyValue = 0
Is there a way to do this?
TIRislaa
SELECT MyValue
FROM MyTable
Based on the value in the field MyValue I want to add a value to a new
column in the result of the query.
Example:
If the value in MyValue = 0 then I would add the text "External"
If the value in MyValue = 1 then I would add the text "Internal"
I what to see the same result as the query below (on the fly), without using
union all:
SELECT MyValue, "External" AS ValueDescription
FROM MyTable
WHERE MyValue = 0
UNION ALL
SELECT MyValue, "Internal" AS ValueDescription
FROM MyTable
WHERE MyValue = 0
Is there a way to do this?
TIRislaa