|
|
|
Re: Simple Question [message #609484 is a reply to message #609482] |
Fri, 07 March 2014 05:45 |
|
Crimzon
Messages: 3 Registered: March 2014 Location: Dubai
|
Junior Member |
|
|
After your positive glimpse on decode function,
i tried the following and it seems working now.
Select a, b, decode(case
when a=b then '1'
when a<>b then '0'
end), '1', 'Yes', '0', 'No') Result
[Updated on: Fri, 07 March 2014 05:47] Report message to a moderator
|
|
|
Re: Simple Question [message #609486 is a reply to message #609484] |
Fri, 07 March 2014 06:00 |
|
Michel Cadot
Messages: 68645 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Just:
select a, b, deoode(a, b, 'Yes', 'No') result
from mytab
/
Or the same with CASE.
You don't need to use both of them.
|
|
|