Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Many updates.

Status
Not open for further replies.

160473

IS-IT--Management
Apr 16, 2003
55
FI
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
 
Hi Janne,
Are you looking for us to give you an SQL statement?

What have you tried so far, and what results did you get?

[cheers]
Cheers!
Laura
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top