Re: subselect fails
Before I change the foreign key name in the billing table to something else, am I missing a syntax error?
SELECT w.*, b.* FROM project p JOIN workunit w ON p.projectid = w.projectid LEFT JOIN billing b ON w.workunitid = b.workunitid WHERE p.projectid = 9 ORDER BY w.type, w.workunitid ASC";
Result is that
(1) Though workunitid exists in both workunit (w.) and billing (b.) tables, the sql result set shows it only once.
(2) If there is no corresponding workunitid in b., the sql result shows workunitid as NULL (which I guess means the the result set is picking up the b.workunitid, not the w.workunitid.)
I have tried changing the select to read "SELECT w.workunitid, w.*, b.* ..."). Same result.
The number of records in the result set is correct, as are all the workunit and billing fields. Just the workunitid is corrupted.
Subject
Written By
Posted
Re: subselect fails
June 22, 2018 12:31PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.