Hello,
I am trying to join our REPORT_MM_RECEIPTS table to our MV_ITEMMAST table. I am joining on the ITEM field. The issue is that in the REPORT_MM_RECEIPTS table, the field is trimmed. In the other table, it has the 32 characters of the field filled with blanks. Anyway, although aside from this there are matches, the query returns no results. I understand this and can work around with a sub-query to trim the field in the MV_ITEMMAST table. However here is what I found interesting...
When I join to a third table (Process Level_Tbl), the query returns results from all three tables. Can you tell me what is causing Access to accommodate the field when their is an additional table joined? I appreciate your help.
Thank you,
Pat
Here is the SQL from the first scenario ( returns no records):
SELECT REPORT_MM_RECEIPTS.ITEM, MV_ITEMMAST.ITEM, REPORT_MM_RECEIPTS.REC_DATE
FROM REPORT_MM_RECEIPTS INNER JOIN MV_ITEMMAST ON REPORT_MM_RECEIPTS.ITEM = MV_ITEMMAST.ITEM
WHERE (((REPORT_MM_RECEIPTS.REC_DATE)=#10/29/2015#));
Here is the SQL from the second scenario (returns results from all three tables:
SELECT REPORT_MM_RECEIPTS.ITEM, MV_ITEMMAST.ITEM, REPORT_MM_RECEIPTS.REC_DATE, [Process Level_Tbl].[PROC-LEVEL Code]
FROM (REPORT_MM_RECEIPTS INNER JOIN MV_ITEMMAST ON REPORT_MM_RECEIPTS.ITEM = MV_ITEMMAST.ITEM) INNER JOIN [Process Level_Tbl] ON REPORT_MM_RECEIPTS.PROCESS_LEVEL = [Process Level_Tbl].[PROC-LEVEL Code]
WHERE (((REPORT_MM_RECEIPTS.REC_DATE)=#10/29/2015#));
Screen shots attached.
I am trying to join our REPORT_MM_RECEIPTS table to our MV_ITEMMAST table. I am joining on the ITEM field. The issue is that in the REPORT_MM_RECEIPTS table, the field is trimmed. In the other table, it has the 32 characters of the field filled with blanks. Anyway, although aside from this there are matches, the query returns no results. I understand this and can work around with a sub-query to trim the field in the MV_ITEMMAST table. However here is what I found interesting...
When I join to a third table (Process Level_Tbl), the query returns results from all three tables. Can you tell me what is causing Access to accommodate the field when their is an additional table joined? I appreciate your help.
Thank you,
Pat
Here is the SQL from the first scenario ( returns no records):
SELECT REPORT_MM_RECEIPTS.ITEM, MV_ITEMMAST.ITEM, REPORT_MM_RECEIPTS.REC_DATE
FROM REPORT_MM_RECEIPTS INNER JOIN MV_ITEMMAST ON REPORT_MM_RECEIPTS.ITEM = MV_ITEMMAST.ITEM
WHERE (((REPORT_MM_RECEIPTS.REC_DATE)=#10/29/2015#));
Here is the SQL from the second scenario (returns results from all three tables:
SELECT REPORT_MM_RECEIPTS.ITEM, MV_ITEMMAST.ITEM, REPORT_MM_RECEIPTS.REC_DATE, [Process Level_Tbl].[PROC-LEVEL Code]
FROM (REPORT_MM_RECEIPTS INNER JOIN MV_ITEMMAST ON REPORT_MM_RECEIPTS.ITEM = MV_ITEMMAST.ITEM) INNER JOIN [Process Level_Tbl] ON REPORT_MM_RECEIPTS.PROCESS_LEVEL = [Process Level_Tbl].[PROC-LEVEL Code]
WHERE (((REPORT_MM_RECEIPTS.REC_DATE)=#10/29/2015#));
Screen shots attached.