EXPERT RESPONSE
Yes, you can stuff a whole
raft
[syn: batch, deal, flock, good deal, great deal, hatful, heap, lot,
mass, mess, mickle, mint, muckle, peck, pile, plenty, pot, quite a little,
sight, slew, spate, stack, tidy sum, wad, whole lot, whole slew]
of translations into the SELECT if you wish...
select case emp_id
when 1 then 'John'
when 2 then 'Mary'
else cast(emp_id as char(4))
end as emp_string
from emp_tb
Note that some database systems may require the CAST, but
some don't, and will set the datatype of the CASE expression
from the first defined expression inside the CASE.
|