| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.misc -> SQL question
Hi,
a newbie question:
have a table with two columns
Col_A          Col_B
vv yyy qq qq zz zz How to create an additional column Col_A Col_B Different_A_B_Or_Not ================================= vv yyy 1 qq qq 0 zz zz 0
Here's what I have tried (& won't work)
select Col_A, Col_B
, decode(( Col_A != Col_B )
                , 0, 0
                , 1, 1
                , NULL ) as Col_Different_Or_Not
from ...
Need your help, thanks,
Michael Received on Wed May 20 1998 - 09:25:52 CDT
|  |  |