Ashank4vba
Programmer
Hi,
Im confused about the following query
The query works, but if you notice the fields involved in the relation between the data sources LRQC_REVIEW_METRICS_QRY and TXDBOA_TBL_BALANCE_SHEET_SUMMARY are required to be Null!
How does the relationship work then?
I thought behavior with Nulls are undocumented.
But, I checked many times and get the same following number of records:
With null criteria for both the fields -> 18 records
Without null criteria for both the fields -> 356 records.
The number of records is consistent everytime.
Please clear my confusion!
Thanks a lot!
Im confused about the following query
Code:
SELECT
RESTATEMENT_FUNDS_LIST.PARTNERSHIP_NUMBER, LRQC_REVIEW_METRICS_QRY.FISCALYEAR, LRQC_REVIEW_METRICS_QRY.RECEIVED, RESTATEMENT_FUNDS_LIST.PARTNERSHIP_FUND_NAME, TXDBOA_TBL_BALANCE_SHEET_SUMMARY.FISCAL_YEAR
FROM
(RESTATEMENT_FUNDS_LIST LEFT JOIN LRQC_REVIEW_METRICS_QRY
ON RESTATEMENT_FUNDS_LIST.PARTNERSHIP_NUMBER = LRQC_REVIEW_METRICS_QRY.PARTNERSHIP_ID)
LEFT JOIN TXDBOA_TBL_BALANCE_SHEET_SUMMARY
ON (LRQC_REVIEW_METRICS_QRY.PARTNERSHIP_NUMBER = TXDBOA_TBL_BALANCE_SHEET_SUMMARY.PARTNERSHIP_ID) AND (LRQC_REVIEW_METRICS_QRY.FISCALYEAR = TXDBOA_TBL_BALANCE_SHEET_SUMMARY.FISCAL_YEAR)
GROUP BY
RESTATEMENT_FUNDS_LIST.PARTNERSHIP_NUMBER, LRQC_REVIEW_METRICS_QRY.FISCALYEAR, LRQC_REVIEW_METRICS_QRY.RECEIVED, RESTATEMENT_FUNDS_LIST.PARTNERSHIP_FUND_NAME, TXDBOA_TBL_BALANCE_SHEET_SUMMARY.PARTNERSHIP_ID, TXDBOA_TBL_BALANCE_SHEET_SUMMARY.FISCAL_YEAR
HAVING
(((LRQC_REVIEW_METRICS_QRY.FISCALYEAR)=2004) AND ((LRQC_REVIEW_METRICS_QRY.RECEIVED)="Yes") AND ((TXDBOA_TBL_BALANCE_SHEET_SUMMARY.PARTNERSHIP_ID) Is Null) AND ((TXDBOA_TBL_BALANCE_SHEET_SUMMARY.FISCAL_YEAR) Is Null));
The query works, but if you notice the fields involved in the relation between the data sources LRQC_REVIEW_METRICS_QRY and TXDBOA_TBL_BALANCE_SHEET_SUMMARY are required to be Null!
How does the relationship work then?
I thought behavior with Nulls are undocumented.
But, I checked many times and get the same following number of records:
With null criteria for both the fields -> 18 records
Without null criteria for both the fields -> 356 records.
The number of records is consistent everytime.
Please clear my confusion!
Thanks a lot!