• Find unmatched fields (Access 2000)

    Author
    Topic
    #415983

    Can somebody help me with an sql for finding unmatched fields? I cannot use for the time being the find unmatched query wizard since
    this is not installed in my computer. I want to find only those products for which the two fields called grosspirce
    in both tables do not match.:

    My query is the following :

    SELECT products.Productid, products.grade, products.grossprice, products1.grossprice
    FROM products INNER JOIN products1 ON products.Productid = products1.Productid;

    Thank you in advance

    Viewing 0 reply threads
    Author
    Replies
    • #929039

      I assume you meant GrossPrice, not GrossPirce. You can add Where Products.GrossPrice Products1.GrossPrice:

      SELECT products.Productid, products.grade, products.grossprice, products1.grossprice
      FROM products INNER JOIN products1 ON products.Productid = products1.Productid
      WHERE Products.GrossPrice Products1.GrossPrice;

      This will only return records where GrossPrice is filled in on both sides, but with different values. If you also want to catch records where GrossPrice is filled in on one side and blank on the other side, use:

      SELECT products.Productid, products.grade, products.grossprice, products1.grossprice
      FROM products INNER JOIN products1 ON products.Productid = products1.Productid
      WHERE (Products.GrossPrice Products1.GrossPrice) Or (Products.GrossPrice Is Not Null AND Products1.GrossPrice Is Null) Or (Products.GrossPrice Is Null AND Products1.GrossPrice Is Not Null);

    Viewing 0 reply threads
    Reply To: Find unmatched fields (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: