- Joined
- Jun 13, 2005
- Messages
- 148
- Reaction score
- 0
I am currently developing some webservices for a large insurance company.
We use oracle databases.
I need to pull data from two tables. liability,physdam
each table has duplicate records that use 2 more tables(physrelease,liabrelease) to detemine which I need. (basically different agents have different versions, so it supports legacy systems)
I need to pull this data as one record though, an outer join is ideal excpet for the foourth table.
So my first query works, but does not properly filter the results of table 3.
the second bold line filtyers the results for me based on the first bold line, I need to do the same for the table listed after the join.
Unfortuantely I can not include the 4th table there like i can in a normal select query.
what i wanted;
this however returns a 'missing keyword' error.
how do I include, and specify the 4th table 'LIABREL' without generating this issue.
shots in the dark are fine, I'm stumped.
Thank you!
We use oracle databases.
I need to pull data from two tables. liability,physdam
each table has duplicate records that use 2 more tables(physrelease,liabrelease) to detemine which I need. (basically different agents have different versions, so it supports legacy systems)
I need to pull this data as one record though, an outer join is ideal excpet for the foourth table.
So my first query works, but does not properly filter the results of table 3.
Code:
SELECT *
[b]from EBR.VINMASTER_PHYSDAM_RELEASE PHYSREL, EBR.VINMASTER_PHYSDAM PHYS[/b]
LEFT OUTER JOIN EBR.VINMASTER_LIABILITY LIAB
ON PHYS.VEHICLE_IDENTIFICATION_NUMBER=LIAB.VEHICLE_IDENTIFICATION_NUMBER
WHERE LIAB.EFFECTIVE_DATE <= TO_DATE('2007-06-28', 'YYYY-MM-DD')
AND LIAB.vehicle_identification_number = '1VWCH016&C'
AND [b]PHYS.VINMASTER_RELEASE_ID = PHYSREL.ID [/b]
AND PHYSREL.ID <= '0704'
AND PHYSREL.RELEASE_DATE <= TO_DATE('2007-06-28', 'YYYY-MM-DD')
AND PHYS.EFFECTIVE_DATE <= TO_DATE('2007-06-28', 'YYYY-MM-DD')
AND PHYS.vehicle_identification_number = '1VWCH016&C'
the second bold line filtyers the results for me based on the first bold line, I need to do the same for the table listed after the join.
Unfortuantely I can not include the 4th table there like i can in a normal select query.
what i wanted;
Code:
SELECT *
from EBR.VINMASTER_PHYSDAM_RELEASE PHYSREL, EBR.VINMASTER_PHYSDAM PHYS
[b]LEFT OUTER JOIN EBR.VINMASTER_LIABILITY LIAB, EBR.VINMASTER_LIABILITY_RELEASE LIABREL[/b]
ON PHYS.VEHICLE_IDENTIFICATION_NUMBER=LIAB.VEHICLE_IDENTIFICATION_NUMBER
WHERE LIABREL.ID <= '0703'
AND LIABREL.RELEASE_DATE <= TO_DATE('2007-06-28', 'YYYY-MM-DD')
AND LIAB.EFFECTIVE_DATE <= TO_DATE('2007-06-28', 'YYYY-MM-DD')
AND LIAB.vehicle_identification_number = '1VWCH016&C'
AND PHYS.VINMASTER_RELEASE_ID = PHYSREL.ID
AND PHYSREL.ID <= '0704'
AND PHYSREL.RELEASE_DATE <= TO_DATE('2007-06-28', 'YYYY-MM-DD')
AND PHYS.EFFECTIVE_DATE <= TO_DATE('2007-06-28', 'YYYY-MM-DD')
AND PHYS.vehicle_identification_number = '1VWCH016&C'
this however returns a 'missing keyword' error.
how do I include, and specify the 4th table 'LIABREL' without generating this issue.
shots in the dark are fine, I'm stumped.
Thank you!