Subject Complex update
Author Renato Martins
I´ve got a situation like this. I have to populate a table, with all the
days of a month, for each of the workers (let´s call it Table1). All right,
I´ve done this with a procedure that goes reasonably fast (generates +1000
records in about 5 seconds).

Then I must generate a temporary table with the accesses the workers had in
that month. Ok, insert ... select solved here (call it table2).

Now comes the hard part.
For each record in table1, I must look data in table2, based on *dozens* of
conditions, to update them (the record on table1).
I couldn´t imagine an update / select which could do the work.

So, I went with the infamous while not ...eof.

The problem is I have to do two loops in the table, and the table has more
than 1000 records.

Running in the local server, it took 10+ minutes to go.
If I can´t do with an update, is there any other way (I mean, not using
while eof?).

BTW, I was doing it with IBXs table component, and migrated to IBOs Table
component, and it didn´t get any better...

Any tip would be appreciated.
TIA,
Renato







[Non-text portions of this message have been removed]