Subject | RE: [firebird-support] Re: Semantics of "for select" |
---|---|
Author | Alan McDonald |
Post date | 2009-02-07T22:31:15Z |
>you insert the required changes in a "changes" table which records the table
> > I think that you must not change anything that can affect result
> of select.
>
> I try avoiding it, but there are useful patterns that require it. For
> instance, you want to synchronize table1 and table2. You do a full
> outer joint between them and check on the non-matching records on
> either side (one side gets you new records, the other side gets you
> records you should delete). How do you add/delete those records in
> table1 to sync it to table2?
>
name, the PK and the action (I/U/D). Then at completion of the analysis
phase, you run over the changes table applying the recorded actions and once
done (and part fo the transaction), you delete from the changes table.
Alan