G
Guest
hi,
I have the following make_history query:
SELECT
tbl_masterpop_new.[Loan Acct #], tbl_masterpop_new.Status,
tbl_masterpop_new.PopEnterDt, tbl_masterpop_new.[chg off date],
tbl_masterpop_new.[loan status], tbl_masterpop_new.[inventory status],
tbl_masterpop_new.[active bk flag], tbl_masterpop_new.[active inactive flag],
tbl_masterpop_new.[paid off?], tbl_masterpop_new.[payoff date],
tbl_masterpop_new.[days delinquent], tbl_masterpop_new.[amended this mo?],
tbl_masterpop_new.[extended this mo?]
FROM tbl_masterpop_new LEFT JOIN tbl_masterpop_main
ON tbl_masterpop_new.[Loan Acct #] = tbl_masterpop_main.[Loan Acct #]
WHERE tbl_masterpop_main.[Loan Acct #] is Null
UNION ALL SELECT
tbl_masterpop.[Loan Acct #], tbl_masterpop.Status, tbl_masterpop.PopEnterDt,
tbl_masterpop.[chg off date], tbl_masterpop.[loan status],
tbl_masterpop.[inventory status], tbl_masterpop.[active bk flag],
tbl_masterpop.[active inactive flag], tbl_masterpop.[paid off?],
tbl_masterpop.[payoff date], tbl_masterpop.[days delinquent],
tbl_masterpop.[amended this mo?], tbl_masterpop.[extended this mo?]
FROM tbl_masterpop LEFT JOIN tbl_masterpop_main
ON tbl_masterpop.[Loan Acct #] = tbl_masterpop_main.[Loan Acct #]
WHERE tbl_masterpop_main.[Loan Acct #] is Null;
When I look at the results, I notice that there are duplicate [loan acct #]
(2 in fact) even though the records have different [status]. I DO NOT want a
[loan account #] to be listed twice in the query. How can I amend the query
to do this?
thanks in advance,
geebee
I have the following make_history query:
SELECT
tbl_masterpop_new.[Loan Acct #], tbl_masterpop_new.Status,
tbl_masterpop_new.PopEnterDt, tbl_masterpop_new.[chg off date],
tbl_masterpop_new.[loan status], tbl_masterpop_new.[inventory status],
tbl_masterpop_new.[active bk flag], tbl_masterpop_new.[active inactive flag],
tbl_masterpop_new.[paid off?], tbl_masterpop_new.[payoff date],
tbl_masterpop_new.[days delinquent], tbl_masterpop_new.[amended this mo?],
tbl_masterpop_new.[extended this mo?]
FROM tbl_masterpop_new LEFT JOIN tbl_masterpop_main
ON tbl_masterpop_new.[Loan Acct #] = tbl_masterpop_main.[Loan Acct #]
WHERE tbl_masterpop_main.[Loan Acct #] is Null
UNION ALL SELECT
tbl_masterpop.[Loan Acct #], tbl_masterpop.Status, tbl_masterpop.PopEnterDt,
tbl_masterpop.[chg off date], tbl_masterpop.[loan status],
tbl_masterpop.[inventory status], tbl_masterpop.[active bk flag],
tbl_masterpop.[active inactive flag], tbl_masterpop.[paid off?],
tbl_masterpop.[payoff date], tbl_masterpop.[days delinquent],
tbl_masterpop.[amended this mo?], tbl_masterpop.[extended this mo?]
FROM tbl_masterpop LEFT JOIN tbl_masterpop_main
ON tbl_masterpop.[Loan Acct #] = tbl_masterpop_main.[Loan Acct #]
WHERE tbl_masterpop_main.[Loan Acct #] is Null;
When I look at the results, I notice that there are duplicate [loan acct #]
(2 in fact) even though the records have different [status]. I DO NOT want a
[loan account #] to be listed twice in the query. How can I amend the query
to do this?
thanks in advance,
geebee