Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Help with Query
> "Ramon E. Estevez" wrote:
>
>
> Hi list I need some help with a query. I have 3 tables ORIGINALES,
> CAMBIOS_ORIGINALES, DATOS_FABRICANTES, I have to be able to query an
> article for whatever code the user
> provide, ex: (NUMERO_ORIGINAL, CAMBIO_ORIGINAL, NUMERO_FABRICANTE).
> The 3 tables
> have a common column, NUMERO_ORIGINAL.
>
> When he type a code, no matter which one, I have to display the
> NUMERO_ORIGINAL,
> CAMBIO_ORIGINAL(s), NUMERO_FABRICANTE(s) and the DESCRIPTION of the
> article. I merged
> the 3 codes in the CODIGO_ARTICULO column to make the join for that
> column, but I can't get
> the DESCRIPTION of the article.
>
> Any help would be appreciated,
>
Ramon,
Your mistake is not to join (on NUMERO_ORIGINAL) with ORIGINALES in the second and third SELECTs of your union - which by the way would be better defined as UNION ALL to avoid a sort.
-- Regards, Stephane Faroult Oriole Software -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Stephane Faroult INET: sfaroult_at_oriole.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Dec 02 2002 - 16:48:59 CST
![]() |
![]() |