Subject Re: How can I insert a range of rows from one table into another?
Author phil_hhn
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@t...> wrote:
> phil_hhn wrote:
>
> >Effectively my starting approach would be something like:
> >
> >insert into tableB (tableB.role) values (tableA.role) where
> >(tableA.role not in (select tableB.role from tableB) ) AND
> >(select distinct tableA.role from tableA)
> >
> >I know this is wrong, but this more-or-less what I'm trying to
achieve...
> >
> >
> >
> Hi,
>
> insert into tableB select distinct role from tableA

Thanks, but maybe I simplified my problem too much ;-)
The column in tableB actually has a different name, and there are
other columns (and a PK with generator/trigger) on tableB.
So the above statement does not work...