Need to find mismatch fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ysn
    New Member
    • Sep 2006
    • 1

    Need to find mismatch fields

    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
  • jkantner
    New Member
    • Sep 2006
    • 7

    #2
    Originally posted by ysn
    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 KapesDistProdOp er.Product, KapesDistProdOp er.Oper, KapesDistProdOp er.Task, KapesDistProdOp er.OperAndTask, KapesDistProdOp er.Description
    FROM KapesDistProdOp er LEFT JOIN REPORT_HSSAP04 ON KapesDistProdOp er.Task = REPORT_HSSAP04. task
    WHERE (((REPORT_HSSAP 04.Prod) Is Null) AND ((REPORT_HSSAP0 4.Oper) Is Null) AND ((REPORT_HSSAP0 4.task) Is Null))
    ORDER BY KapesDistProdOp er.Product, KapesDistProdOp er.Oper, KapesDistProdOp er.Task;

    Hope this helps,
    jkantner

    Comment

    Working...