I am trying to create a remote view that joins several tables:
CREATE SQL VIEW wholsale REMOTE CONNECTION merlin6 AS;
SELECT;
<83 columns of data>;
from merlin!mfmaster LEFT OUTER JOIN merlin!arm ON MFMASTER.LNID = ARM.LNID;
LEFT OUTER JOIN merlin!funding ON mfmaster.LNID = funding.LNID;
LEFT OUTER JOIN merlin!property ON mfmaster.LNID = property.LNID;
LEFT OUTER JOIN merlin!inv_delv ON mfmaster.LNID = inv_delv.LNID;
LEFT OUTER JOIN merlin!cpi ON mfmaster.LNID = cpi.LNID;
LEFT OUTER JOIN merlin!loan_event ON mfmaster.LNID = loan_event.LNID;
LEFT OUTER JOIN merlin!borrower ON mfmaster.LNID = borrower.LNID;
where mfmaster.CD_LOAN;
AND (mfmaster.status = "LOCKED";
OR mfmaster.status = "CLOSE";
OR mfmaster.status = "FUND";
OR mfmaster.status = "PEND");
AND (borrower.borr_no = "1" or borrower.borr_no = " ")
The view is created but when I USE it only returns about 1/4 of the rows I expect. If I just issue the sql select without the view it works fine.
Also if I try to modify the wholsale view I get the error SQL: "Cannot Locate Table"
I've tried to create the view with the designer but it has problems with more than 1 join.
I am new at using outer joins, maybe there is something wrong with my syntax.
Any ideas?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only