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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Join ?

Re: Join ?

From: Eugenio <eugenio.spadafora_nospam_at_compaq.com>
Date: 2000/06/21
Message-ID: <8iqn2l$1mr$1@mailint03.im.hou.compaq.com>#1/1

But you can also rewrite the query as

SELECT DISTINCTROW BOX_1.CD_BOX
FROM
    BOX BOX_1,
    COMPO COMPO_1,
    COMPO,
    ITEM,
    BOX
WHERE
 BOX_1.CD_BOX = COMPO_1.CD_BOX
AND
  COMPO.CD_PATTERN_LINK = ITEM.CD_ITEM
AND
   COMPO.CD_BOX = BOX.CD_BOX
AND
   COMPO_1.CD_BOX_LINK = BOX.CD_BOX
AND
   COMPO.TYP_SUBTYPE=2 and you should have the same result
(if I didn't miss anything)

--
be happy

Eugenio
remove _nospam from reply address

Opinions are mine and do not necessarily reflect those of my company

=======================================================
Xavier NOPRE wrote in message <8iqdgk$6mr$1_at_wanadoo.fr>...

>Hi,
>
>> Maybe i don't really understand what you mean but
>> this syntax is general, you list all the tables in the
>> from clause and the join conditions in the where clause:
>>
>> SELECT *
>> FROM T3, T2, T1
>> WHERE T1.F1 = T2.F2
>> AND T1.F1 = T3.F3
>> AND (...);
>
>Yes, in the case of serial JOIN, but in the case of JOIN between other
JOIN,
>it is more complex ...
>
>> Send us and exact example of what you want and we will be
>> able to answer more precisely.
>
>Yes, here is an example:
>
>SELECT DISTINCTROW BOX_1.CD_BOX
>FROM (BOX AS BOX_1 JOIN COMPO AS COMPO_1 ON BOX_1.CD_BOX = COMPO_1.CD_BOX)
>JOIN ((COMPO JOIN ITEM ON COMPO.CD_PATTERN_LINK = ITEM.CD_ITEM) JOIN BOX ON
>COMPO.CD_BOX = BOX.CD_BOX) ON COMPO_1.CD_BOX_LINK = BOX.CD_BOX
>WHERE ((COMPO.TYP_SUBTYPE=2))
>
>I have succeeds in transforming it like that:
>
>SELECT DISTINCT CD_BOX
>FROM (SELECT COMPO.CD_BOX_LINK AS CD_BOX_LINK1
> FROM BOX,COMPO
> WHERE BOX.CD_BOX=COMPO.CD_BOX),
> (SELECT CD_BOX
> FROM BOX,(SELECT COMPO.CD_BOX AS CD_BOX1
> FROM COMPO,ITEM
> WHERE COMPO.CD_PATTERN_LINK=ITEM.CD_ITEM)
> WHERE CD_BOX=CD_BOX1)
>WHERE CD_BOX_LINK1=CD_BOX;
>
>But it is more complex than with JOIN. My question is : is JOIN supported
by
>Oracle ? Is there an alternative ?
>
>Regards, Xavier
>
>
>
Received on Wed Jun 21 2000 - 00:00:00 CDT

Original text of this message

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