Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Problem using left join in query
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
![]() |
![]() |