>I have:
>
>Table1 (large table with over 50,000 records)
>
>table 2 (always a small table with 100 records or less)
>
>I want add data of table 2 to table 1
>
>if field table2.device_id already exists on table1.device_id
>
>= messagebox (Record already exists)
>
>What is the best way to do such append ?
I would first, separately, check for duplicate data.
select device_id from Table2;
where device_id in (select device_id from Table1);
to screen noconsole
if _tally > 0
...
select *;
from table1 join table2 on table1.device_id = table2.device_id;
to screen noconsole
if _tally > 0
...
Then, if there is no error, just do an APPEND FROM.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)