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 -> Problem using left join in query

Problem using left join in query

From: Paul Tomlinson <rubberducky703_at_hotmail.com>
Date: Mon, 22 Dec 2003 11:17:21 -0000
Message-ID: <bs6js3$a4tr6$1@ID-116287.news.uni-berlin.de>


All,

I am an experienced oracle query writer, however when I want to join to tables I have exclusively only used the standard = operator or the (+) outer join operator.

I need to join table a to table b and table a to table c where a record in table a might not exist.....

SELECT JOBS.JOB_ID, STAGES.STAGE
FROM JOBS, JOB_DETAIL, STAGES
LEFT JOIN JOBS ON (JOBS.JOB_ID = JOB_DETAIL.JOB_ID) LEFT JOIN STAGES ON (STAGES.STAGE_ID = JOB_DETAIL.STAGE_ID) AND JOBS.JOB_ID IN (00001) The row in job_detail might not exist, in which case all I want back is a job_id.

There seems to be a problem with my syntax because Oracle is complaining that job_details.job_id is an "invalid identifier"

Your thoughts?
PT Received on Mon Dec 22 2003 - 05:17:21 CST

Original text of this message

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