MySQL Forums
Forum List  »  Newbie

How to merge new records from TABLE 1 to TABLE 2
Posted by: Walter NULL !
Date: February 05, 2019 07:38AM

-1


I have two MySQL tables: paalim and paalim_copy.

Table paalim_copy has some records from paalim, but also some new records. How can I merge these new records into paalim by using a MySQL UNIX command line?

The MySQL line which I tried (with Authorname Hackl, A. for example) is this:

insert into paalim VALUES
(Authorname,locQuery,eid,Affiliation,AffiliationINDEX,TabID,Moddate)
SELECT
b.Authorname,b.locQuery,b.eid,b.Affiliation,
b.AffiliationINDEX,b.TabID,b.Moddate
from paalim a left outer JOIN paalim_copy b on a.Authorname =
b.Authorname where (a.Authorname = 'Hackl, A.');

The problem is:
An outer join can not be used as all fields are available but new content.
I have a DOC ID EDI and an Authormane,

Can anyone here help me please?
Thanks

Options: ReplyQuote


Subject
Written By
Posted
How to merge new records from TABLE 1 to TABLE 2
February 05, 2019 07:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.