0

now I have an query for enter data, but this data can be already exist. If it's true, I want to update this.

With this explanation, I think the best idea is the ON DUPLICATE KEY UPDATE but it's doesn't exist in access. Some other post have an idea like merge or ON x = y SET x = y, y = x but it's doesn't work.

Anyone have a way for do that ?

Alaanor
  • 255
  • 4
  • 20
  • 1
    have you looked at [this SO Q/A: ](http://stackoverflow.com/questions/12694841/ms-access-how-to-achieve-on-duplicate-key-update). It looks like an 'Update' query in MSAccess will do what you are asking. You may want to add more context and some example queries to your Question. You may need to run two queries: one to search for the existing record. and another to either update the row or insert a new record. – Bill Feb 26 '15 at 14:10
  • I really don't understand enough about what you are doing to answer performance questions. You may run into a wall with MSAccess though, performance may not be your biggest concern...it may be that you must use that approach because there may not be another way. Please give more information about what you are doing so I can help you better. – Bill Feb 26 '15 at 14:17
  • It's right, ... I will accept as answer the first comment. – Alaanor Feb 26 '15 at 14:27

1 Answers1

0

Have you looked at this SO Q/A:.

It looks like an 'Update' query in MSAccess will do what you are asking.

You may want to add more context and some example queries to your Question.

You may need to run two queries:

  1. one to search for the existing record.
  2. and another to either update the row or insert a new record
Community
  • 1
  • 1
Bill
  • 314
  • 1
  • 10