j_ferree (AT) yahoo (DOT) com wrote:
Quote:
I have the following Query. Unfortunately the DB has a PROJ_ID = 0
that is not in the REPORTPM.PROJECT table.
How do I write the query to include those results?
select PROJECT_ID,ACTUALS_TOTAL
from REPORTPM.ALL_HOURS_MV, REPORTPM.PROJECT
where REPORTPM.ALL_HOURS_MV.PROJECT_ID = REPORTPM.PROJECT.PROJ_ID
and PROJECT_ID < 425
Thank you,
Jim |
Try this
select PROJECT_ID,ACTUALS_TOTAL
from REPORTPM.ALL_HOURS_MV, REPORTPM.PROJECT
where REPORTPM.ALL_HOURS_MV.PROJECT_ID =* REPORTPM.PROJECT.PROJ_ID
and PROJECT_ID < 425
Note I have changed the = to =* in the where clause. I think this is
the right way round if not try *=. This is old syntax which is
relplaced with FROM table name JOIN table2 ON etc.
Hope this helps
Duncan