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: Joining the one column with two other columns

Re: Joining the one column with two other columns

From: Anurag Varma <avarmadba.skipthis_at_yahoo.com>
Date: Sat, 23 Aug 2003 03:31:48 GMT
Message-ID: <EeB1b.483$081.339@nwrddc02.gnilink.net>

"Prince Kumar" <gspk_at_yahoo.com> wrote in message news:629275ba.0308220911.74d3f266_at_posting.google.com...
> I post this question, becaz I couldn't get the expected result. I
> thought some one has some ideas.
>
> Why people bother commenting, if they can not provide the solution or
> direction?
>
> Prince.

Be glad if you can use what you borrow. You are asking a question in a newsgroup,
noone has the obligation to answer you straight. We are not really working for you ... you see.

Try select sum(decode(pp.pkey, t.record#, pp.amount, 0)) ptot,

                sum(decode(pp.rkey, t.record#, pp.amount, 0)) rtot
       from pp, t
       where pp.pkey = t.record# or pp.rkey = t.record#

What is it for? Write the query in one select statement competition?

Anurag Received on Fri Aug 22 2003 - 22:31:48 CDT

Original text of this message

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