You can:

Insert into delVend (vendorn) Select vendorn from vendor where vendor2 in (sel vendorn from master)

del dup from delVendor


But would a view be better?

Create view delVend (vendorn) as +
select vendorn +
from vendor +
where vendorn in (sel vendorn from  master) +
union +
select vendorn +
from vendor +
where vendor2 in (sel vendorn from master)

The union removes dupes automatically. If you would be using the table above routinely the view would be better as it would always be up to date. If only once, modify the above to "create TEMP view" and it will vanish when you disc from the DB. Also, views don't cause database bloat.

Ben Petersen


On 4 May 2005 at 17:08, Steve Breen wrote:

>
> Now I am beginning to think I might be wearing out my welcome. But here is something I am
> trying to accomplish.
>
> Project DelVend from vendor using vendorn where vendorn in (sel vendorn from master) -
> Working fine
> Next I need to append data to this table as follows
> ?from vendor using vendorn where vendor2 in (sel vendorn from master)
> Then I need to remove the duplicates.
> Thanks for any help I can get on this.
>
> Stephen Breen

Reply via email to