Hello guys,
I need some help here... we are running into a manual phase in a database... which I am hoping that there is a shorter way to do it...
Basically, I have a query below:
Then the result of this query, will be exported into Excel... after that, we have a table named WorkFlow, which contains the whole pool of records, then on the WorkFlow table, I just filter it to East/West = "East" and TestPeriod = "2010Q2"... then the loans filtered by these criteria will then just have the LoanNumber column be exported into the same excel file from the query above...
Then after that, I do a vlookup to the list of Loans from the WorkFlow table, that basically will filter down all loans that is in the query and is NOT in the WorkFlow table...
Long story short.. it should only have loans that are in the tblAbstract but is NOT in the WorkFlow table...
I tried to do create a query to give this result...but I think is incorrect...
Is there any way you could help me out with this?
Please let me know if you have any questions or if I need to provide more information.
Any help is greatly appreciated...
Thank you
I need some help here... we are running into a manual phase in a database... which I am hoping that there is a shorter way to do it...
Basically, I have a query below:
Code:
SELECT tblAbstract.PropertyID, tblAbstract.InvestorNumber, tblAbstract.LoanNumber, tblAbstract.[East/West], "2010Q2" AS TestPeriod, tblAbstract.Watchlist
FROM tblAbstract WHERE (((tblAbstract.DateReviewed) Is Not Null) AND ((tblAbstract.[Special Servicing])=0) AND ((tblAbstract.PaidOff)=0) AND ((tblAbstract.[Not in Scope])=0) AND ((tblAbstract.InactiveChk)=0) AND ((tblAbstract.Defeased)=0))
GROUP BY tblAbstract.PropertyID, tblAbstract.InvestorNumber, tblAbstract.LoanNumber, tblAbstract.[East/West], "2010Q2", tblAbstract.Watchlist, tblAbstract.TestsPerYear
HAVING (((tblAbstract.[East/West])="East") AND ((tblAbstract.TestsPerYear)="Quarterly" Or (tblAbstract.TestsPerYear)="Monthly"))
ORDER BY tblAbstract.TestsPerYear;
Then the result of this query, will be exported into Excel... after that, we have a table named WorkFlow, which contains the whole pool of records, then on the WorkFlow table, I just filter it to East/West = "East" and TestPeriod = "2010Q2"... then the loans filtered by these criteria will then just have the LoanNumber column be exported into the same excel file from the query above...
Then after that, I do a vlookup to the list of Loans from the WorkFlow table, that basically will filter down all loans that is in the query and is NOT in the WorkFlow table...
Long story short.. it should only have loans that are in the tblAbstract but is NOT in the WorkFlow table...
I tried to do create a query to give this result...but I think is incorrect...
Code:
SELECT WorkFlow.LoanNumber, tblAbstract.PropertyID, tblAbstract.InvestorNumber, tblAbstract.LoanNumber, tblAbstract.[East/West], WorkFlow.TestPeriod, tblAbstract.Watchlist
FROM tblAbstract LEFT JOIN WorkFlow ON tblAbstract.LoanNumber = WorkFlow.LoanNumber
WHERE (((WorkFlow.LoanNumber) Is Null) AND ((tblAbstract.[East/West])="East") AND ((WorkFlow.TestPeriod)="2010Q2") AND ((tblAbstract.TestsPerYear)="Quarterly" Or (tblAbstract.TestsPerYear)="Monthly" Or (tblAbstract.TestsPerYear)="Semi-Annual") AND ((tblAbstract.DateReviewed) Is Not Null) AND ((tblAbstract.[Special Servicing])=0) AND ((tblAbstract.PaidOff)=0) AND ((tblAbstract.[Not in Scope])=0) AND ((tblAbstract.InactiveChk)=0) AND ((tblAbstract.Defeased)=0))
ORDER BY tblAbstract.TestsPerYear;
Is there any way you could help me out with this?
Please let me know if you have any questions or if I need to provide more information.
Any help is greatly appreciated...
Thank you