Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    delete query (Access 2000)

    From my query, enumerated below,i want to delete the productId = 2 from orderid = 4.I want to build a delete query in sql view. and later on give the command run sql.How can i do that ?

    SELECT orders.orderid, products.Productid FROM products INNER JOIN (orders INNER JOIN [order details] ON orders.orderid = [order details].OrderID) ON products.Productid = [order details].ProductID;

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: delete query (Access 2000)

    I would first create the query in design view, and test that it works the way you want. When it does, switch to SQL view (View | SQL). Delete the line breaks in the SQL string you see, then copy the entire string to the clipboard. You can then use it in VBA - you will have to put quotes " before and after it.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: delete query (Access 2000)

    DELETE * FROM [order details] WHERE ProductID=2 AND OrderID=4
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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