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: SQL: getting data for a null value column ??

Re: SQL: getting data for a null value column ??

From: Chris ( Val ) <chrisval_at_bigpond.com.au>
Date: 3 Aug 2005 20:24:23 -0700
Message-ID: <1123125863.134128.137290@g49g2000cwa.googlegroups.com>

baka wrote:
> Thanks hrishy san (&)
> you are right in one way, but, i mentioned tabB is a master table
> so i have to take name from tabB only. if it not exists then,i have to
> take it from transaction table i.e tabB.
>
> o/p what i want is (without using union)
>
> 001 tabBbankname
> 002 secondbank
> 003 tabBthirdbank
> 004 fourthbank
> 005 Firstunionbank
>
> PS: about union
>
> SELECT a.bankcode,a.bankname
> FROM
> taba a,tabb b where a.bankcode=b.bbankcode(+)
> union
> SELECT b.bbankcode,b.bbankname
> FROM taba a,tabb b where b.bbankcode(+)=a.bankcode
>
> Thans Mr.Arun for reading my mail. but what..

[snip]

Please do not top post, thanks.

Given what you have written, I suspect you do not understand what the UNION construct does.

Like 'Anurag' said, what's wrong with:

select * from taba;
 etc...

?

The UNION construct in it's basic form will select *all* distinct values.

Cheers,
Chris Val Received on Wed Aug 03 2005 - 22:24:23 CDT

Original text of this message

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