I'm trying to convert the following statement in Sybase syntax into the
equivalent sqlite syntax:
update C1_credDerivEvent
set a.CDEvent = a.CDEvent || ',' || b.CDEvent
from C1_credDerivEvent a,
C1_tmp_credDerivEvent b,
tmp_events c
where a.CDId = b.CDId
and b.CDEvent = c.CDEvent
Here's what I came up with but it turns out not to be equivalent at all:
insert or replace into C1_credDerivEvent
select A.CDId as CDId,
A.CDEvent || ',' || B.CDEvent as CDEvent
from C1_credDerivEvent A,
C1_tmp_credDerivEvent B,
tmp_events C
where A.CDId = B.CDId
and B.CDEvent = C.CDEvent;
The Sybase statement simply updates each record for which the where
clause is satified, yielding the same number of rows in the table before
the update as after.
The Sqlite statement on the other hand, adds rows to the table.
Rowcount before "insert or replace": 691,066
Rowcount after "insert or replace": 7,594,268
What am I doing wrong? Is there an equivalent Sqlite syntax or not?
Thanks,
Jim
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not
intend to waive confidentiality or privilege. Use of this email is prohibited
when received in error.