I've created the following script ...
SELECT
gr.RESERVATION_NO,
gr.TITLE,
gr.CATNR,
gl.DUEDATE,
gr.CRE_USR,
gl.QTY,
gl.WORK_CENTER_NO,
gl.TEC_CRITERIA,
gr.RESERVE_QTY,
gl.PLANT,
studate.dt
FROM GPS_RESERVATION gr,
(Select first_date + Level-1 dt
From
(
Select trunc(sysdate) first_date,
trunc(sysdate)+60 last_date
from dual
)
Connect By Level <= (last_date - first_date) +1 ) studate
INNER JOIN GPS_RESERVATION_LOAD gl
ON gl.work_center_no = 'ALIN'
AND gl.duedate = studate.dt
AND gl.plant = 'W'
WHERE gr.RESERVATION_NO = gl.RESERVATION_NO
AND gr.ACTIVE_FLAG = 'Y'
AND gr.reservation_no = '176601'
ORDER BY
gl.DUEDATE
I expected to see ALL DATES from sysdate to sysdate+60 but, I only get dates where duedate exists.
i.e.
I get...

I expected...

What am I doing wrong please ?
Thanks for your help.
grandstudate?cross joinsyntax. The mix may be affecting the join order. But even if you make the inner join an outer join, you're implicitly making it inner again withWHERE gr.RESERVATION_NO = gl.RESERVATION_NO. That needs to be part of the outer join'sonclause.