Re: [sqlite] Smart merge

2011-11-24 Thread nadavius
Hi Simon, Thanks for the quick reply, Your solution worked flawlessly! I had to change the Trigger code by adding "FOR EACH ROW" (it would not accept it is a valid trigger else) Cheers, Nadav. nadavius wrote: > > Hi guys, > > I have two tables T1, T2 - identical in fields [Index1 (INT),

Re: [sqlite] Smart merge

2011-11-23 Thread Igor Tandetnik
nadavius wrote: > I have two tables T1, T2 - identical in fields [Index1 (INT), Index2(INT), > Count(INT), Value(INT)] > I would like to merge the content of T1 into T2 using the following ruels: > 1. Copy into T2 data from T1 where Index1 AND Index2 (like two keys, PK and > SK) do not exist in T2

Re: [sqlite] Smart merge

2011-11-23 Thread Simon Davies
On 23 November 2011 11:23, nadavius wrote: > > Hi guys, > > I have two tables T1, T2 - identical in fields [Index1 (INT), Index2(INT), > Count(INT), Value(INT)] > I would like to merge the content of T1 into T2 using the following ruels: > 1. Copy into T2 data from T1 where Index1 AND Index2 (like

[sqlite] Smart merge

2011-11-23 Thread nadavius
Hi guys, I have two tables T1, T2 - identical in fields [Index1 (INT), Index2(INT), Count(INT), Value(INT)] I would like to merge the content of T1 into T2 using the following ruels: 1. Copy into T2 data from T1 where Index1 AND Index2 (like two keys, PK and SK) do not exist in T2 2. In case that

[sqlite] Smart merge

2011-11-23 Thread nadavius
Hi guys, I have two tables T1, T2 - identical in fields [Index1 (INT), Index2(INT), Count(INT), Value(INT)] I would like to merge the content of T1 into T2 using the following ruels: 1. Copy into T2 data from T1 where Index1 AND Index2 (like two keys, PK and SK) do not exist in T2 2. In case that