Mark Rotteveel m...@lawinegevaar.nl [firebird-support] skrev:
On 13-2-2015 14:55, Kjell Rilbe kjell.ri...@datadia.se
[firebird-support] wrote:
I'm writing a utility that will need to do two things for each record in
an external table and for this purpose I use a for select ... do
construct in an execute block. I do it this way because external tables
can't be indexed and I will scan the entire external table anyway.
The two operations are:
1. Update one existing record in the target table.
2. Insert new record in the same target table.
Maybe you can use MERGE, it uses a source, a target and can
conditionally insert, update (and delete) record? I assume your target
table isn't external and is indexed.
Thanks, that might be worth looking into. I suspect it won't work since
I will need to do BOTH update AND insert for each external record, but I
haven't checked what merge can do yet... :-)
Kjell
--
--
Kjell Rilbe
DataDIA AB
E-post: kjell.ri...@datadia.se
Telefon: 08-761 06 55
Mobil: 0733-44 24 64