Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: views...

Re: views...

From: kai regi <kaiNOkaSPAM_at_rs.ee.invalid>
Date: Fri, 31 Dec 1999 03:20:27 -0800
Message-ID: <00024c9a.5d4429fc@usw-ex0109-066.remarq.com>


Hi,

try this:

select col1,col2,col3,1 from tab1 where <your condition> union all
select col1,col2,col3,0 from tab1 where <your reverse condition>;

or explore the amazing power of decode, like

select col1,col2,col3, decode(col4,'Y',1,'N',0) from tab1,tab2 where <join condition of tab1,tab2>;

Decode is useful only if you have few distinct values of col4 in tab2, like Y and N in this exapmple.

rgds

Received on Fri Dec 31 1999 - 05:20:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US