Hi , i have 2 tables in Acees, table A is Company and table B is Merging_Company.
Company Contains the following fields
CODE , DESCRIPTION , UNIT ID
Table Merging_Company Contais the following fields
CODE , DESCRIPTION , UNIT ID
I am consolidating the company table record in to Merging_company table with the UNIT_ID, This UNIT ID represents the Unique identification between companies.
My requirements here is,
[1] I need to cross verify that number of records in each company in the company table must match with the records in the Merged_company table
[2] Need to find out mismatching code or description between two tables for each company.
Pls help me in building this query
Thanks
Ysn
------------------------------
Use the query wizard to help you get started. Select query/new/find unmatched query wizard.
This will help you to build a query checking one field in Table A that is mismatched/missing in Table B you are comparing to.
When it is finished, Notice in query design mode that the table B field you selected does not have 'show' checked on and its Criteria = is null.
Now you can add the other Table B fields to your query that you want to mismatch so you then have the complete combination. Remember they are 'no show' and criteria = is null.
What you are doing is lookng at table A to see if table B has that value. If not in table B, then it is NULL for table B.
Below is the SQL for a query I have in one of my d-bases.
SELECT KapesDistProdOper.Product, KapesDistProdOper.Oper, KapesDistProdOper.Task, KapesDistProdOper.OperAndTask, KapesDistProdOper.Description
FROM KapesDistProdOper LEFT JOIN REPORT_HSSAP04 ON KapesDistProdOper.Task = REPORT_HSSAP04.task
WHERE (((REPORT_HSSAP04.Prod) Is Null) AND ((REPORT_HSSAP04.Oper) Is Null) AND ((REPORT_HSSAP04.task) Is Null))
ORDER BY KapesDistProdOper.Product, KapesDistProdOper.Oper, KapesDistProdOper.Task;
Hope this helps,
jkantner