I have 2 tables.
One containing data about documnets (doc_table) and one containing data about who is responsible for the document doc_owner_table).
doc_table:
-name
-info
-owner_id
-bla bla bla
doc_owner_table:
-name
-owner_id
I need a query that first inserts the document name (number) into doc_owner_tabel if it does not exists and doc_owner_table.owner_id is null then looks if there is any changes in doc_table.owner_id. If there is recent changes (newer than in doc_table) then update doc_owner_table.owner_id to the newer owner_id.
It also needs to do it in rewerse, if there is changes in doc_owner_table.owner_id, the doc_table.owner_id needs to be changed.
Janne
One containing data about documnets (doc_table) and one containing data about who is responsible for the document doc_owner_table).
doc_table:
-name
-info
-owner_id
-bla bla bla
doc_owner_table:
-name
-owner_id
I need a query that first inserts the document name (number) into doc_owner_tabel if it does not exists and doc_owner_table.owner_id is null then looks if there is any changes in doc_table.owner_id. If there is recent changes (newer than in doc_table) then update doc_owner_table.owner_id to the newer owner_id.
It also needs to do it in rewerse, if there is changes in doc_owner_table.owner_id, the doc_table.owner_id needs to be changed.
Janne