Results 1 to 2 of 2

Thread: Not equal to

  1. #1
    Join Date
    Feb 2004

    Unanswered: Not equal to

    I am joning these 2 tables with [Product Code] to [Product No] in a query. Question is : how can I retrieve those [Product Code] which is not equeal to [Product No]?

    I believe I need to use a SQL to relate it but how is it? Is it Not equal To or <>, I had tried both but fails....

    Please teach.



  2. #2
    Join Date
    Jan 2004

    Re: Not equal to

    This is a common problem in database development.

    You will have to do a subquery within a query:

    SELECT * FROM Table1 WHERE ProductCode NOT IN
    (SELECT ProductCode FROM Table1 JOIN Table2 ON Table1.ProductCode=Table2.ProductNo)

    Let me know if this helps you.
    In abundance of water only the fool is thirsty. Bob Marley.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts