G
geebee
hi,
I have 2 queries. names are make_history and up_tbl_masterpop_main. I am
trying to decipher the differences, as they return not exactly the same
number of rows. can someone tell me the difference/logic?
make_history query:
SELECT
tbl_masterpop_new.[Loan Acct #], tbl_masterpop_new.Status,
tbl_masterpop_new.PopEnterDt
other column names...
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,
other column names...
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;
up_tbl_masterpop_main query:
up_tbl_masterpop_main:
SELECT tbl_masterpop.[Loan Acct #]
, tbl_masterpop.[Status]
,tbl_masterpop.[PopEnterDt],
other column names...
FROM tbl_masterpop LEFT JOIN tbl_masterpop_new
ON tbl_masterpop.[Loan Acct #] = tbl_masterpop_new.[Loan Acct #]
WHERE tbl_masterpop_new.[Loan Acct #] is Null
UNION ALL SELECT tbl_masterpop_new.[Loan Acct #]
, tbl_masterpop_new.[Status]
,tbl_masterpop_new.[PopEnterDt],
other column names...
FROM tbl_masterpop_new LEFT JOIN tbl_masterpop
ON tbl_masterpop_new.[Loan Acct #] = tbl_masterpop.[Loan Acct #]
WHERE tbl_masterpop.[Loan Acct #] is Null;
anyone who can answer this gets huge bonus points!
thanks in advance,
geebee
I have 2 queries. names are make_history and up_tbl_masterpop_main. I am
trying to decipher the differences, as they return not exactly the same
number of rows. can someone tell me the difference/logic?
make_history query:
SELECT
tbl_masterpop_new.[Loan Acct #], tbl_masterpop_new.Status,
tbl_masterpop_new.PopEnterDt
other column names...
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,
other column names...
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;
up_tbl_masterpop_main query:
up_tbl_masterpop_main:
SELECT tbl_masterpop.[Loan Acct #]
, tbl_masterpop.[Status]
,tbl_masterpop.[PopEnterDt],
other column names...
FROM tbl_masterpop LEFT JOIN tbl_masterpop_new
ON tbl_masterpop.[Loan Acct #] = tbl_masterpop_new.[Loan Acct #]
WHERE tbl_masterpop_new.[Loan Acct #] is Null
UNION ALL SELECT tbl_masterpop_new.[Loan Acct #]
, tbl_masterpop_new.[Status]
,tbl_masterpop_new.[PopEnterDt],
other column names...
FROM tbl_masterpop_new LEFT JOIN tbl_masterpop
ON tbl_masterpop_new.[Loan Acct #] = tbl_masterpop.[Loan Acct #]
WHERE tbl_masterpop.[Loan Acct #] is Null;
anyone who can answer this gets huge bonus points!
thanks in advance,
geebee