Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    find unmatched query (Access 2000)

    With the help of the Wizard i have constructed a query for finding unmatched products.
    It works fine and is the folowing

    SELECT [order details].[OrderID], [order details].[ProductID]
    FROM [order details] LEFT JOIN products ON [order details].[ProductID]=[products].[Productid]
    WHERE ((([products].[Productid]) Is Null));

    I want now to delelete the result of this query, that is to say to delete the unmatched products.
    How can i rewrite the query so that i have 2 jobs at once:
    1. to find the unmatched products
    2. to delete them

    I tried to use the wizrad to convert the find unmatched query into a delete query but i received the answer you must specify the fields

    May i ask for help?

  2. #2
    Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: find unmatched query (Access 2000)

    Use the
    Delete orderdetials.*
    From [order details] LEFT JoOIN products ON [order details].[ProductID]=[products].[Productid]
    Where [products].[productid] Is Null;

Posting Permissions

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