Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update query (Access 2000)

    I would like to rewrite my update query,i need to leave the fields in my table Orderspaid unchanged while updating it. Can you help me ?

    UPDATE orders INNER JOIN OrdersPaid ON orders.orderid = OrdersPaid.orderid SET OrdersPaid.paid = [orders].[paid];

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

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

    Re: Update query (Access 2000)

    If you want to leave OrdersPaid unchanged, what do you want to change instead?

  4. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update query (Access 2000)

    Thank you for your question. Acutually i see i have confused things. You are absolutely right.What i want is to append to the table OrdersPaid those orders that are paid, i.e. where paid = True.However i have a problem.My table Orderspaid consists of only two fields, orderid and paid, while the table orders consists of many fields. Perhaps this is the reason why i get errors and my append query does not work :
    INSERT INTO OrdersPaid ( orderid, paid )
    SELECT orders.orderid, OrdersPaid.paid
    FROM orders INNER JOIN OrdersPaid ON orders.orderid = OrdersPaid.orderid
    WHERE (((OrdersPaid.paid)=True));
    Would you help ?

  5. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Update query (Access 2000)

    I'm afraid this doesn't make sense either. If the table OrdersPaid already contains a record for a particular OrderID with Paid = True, you don't have to append it any more - it's already there!

    On the other hand, if you want to append records from the Orders table that have no match in OrdersPaid yet, how can you determine that the order has been paid?

    You will have to re-think your table setup. It's contradictory as it is now.

Posting Permissions

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