I have two tables linked by a foreign key, linkID. I need to transfer content
of these two tables into two corresponding tables in another database
preserving the link. However, the second database already has records and
numeric value of linkID can not be preserved. Nor its value is important
because it simply links the tables. How do I INSERT into two tables, preserving
the link while allowing for value of linkID to change. LinkID is defined as
INTEGER PRIMARY KEY.
It looks to me that I should create a temporary view on the both tables in the
second database and try to use INSTEAD OF trigger. Is that the right way? Or I
have to create a temp table that maps old linkID to new linkID, somehow.
sqlite-users mailing list