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

Home -> Community -> Usenet -> c.d.o.misc -> Re: [newbie] help with sql query

Re: [newbie] help with sql query

From: Dirk Tschentscher <dirk.tschentscherREM_THIS_at_volkswagen.de>
Date: Wed, 6 Nov 2002 14:13:57 +0100
Message-ID: <aqb4if$5vq1@doiweb4.volkswagen.de>


Hi Adi,

I've been waiting a little for Sybrands answer (with just four letters) ...

when you built a relation from T1 to T2, "...from t1,t2 where t1.key = t2.key12"

then you can expand your where clause in this way " select t3.data3 from t1,t2,t3... ...and t2.key23 = t3.key23 "

But you may take a look in the manual, there you'll find some examples (http://tahiti.oracle.com)

rgds

    Dirk

"Adi" <doctoradi_at_yahoo.com> schrieb im Newsbeitrag news:bb8234fa.0211060437.eeb8ea8_at_posting.google.com...
> /* in case this post should be suited better for another newsgroup,
> please inform, and i'll post it over there - thanks */
>
> Hi,
> I was on the look out a for a single query for the
> following
> problem:.
>
> We have three tables as Table1, Table 2, and Table3 having a
> common
> column "key12" between Table1 and Table2, and a common column
> "key23"
> between Table2 and Table3.
>
> So
> Table 1 consists of ( Key 12, Heading, Data1)
> Table 2 consists of ( Key 12, Key 23, Data2)
> Table 3 consists of ( Key 23, Heading, Data3)
>
> If we execute a query based upon key12 between Table1 and
> Table2, it
> returns multiple rows. (Say Result 12)
>
> Now we want to execute a query based upon key 23 between Table 3
> and
> Result 12 (obtained earlier) and display Data3
>
> How to accomplish this all in a single nested query ?
>
> Your help will be highly appreciated.
>
> Very Best regards,
> adi
Received on Wed Nov 06 2002 - 07:13:57 CST

Original text of this message

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