Subject | RE: [firebird-support] Re: How can I insert a range of rows from one table into another? |
---|---|
Author | Chris Donges |
Post date | 2004-06-16T00:04:03Z |
insert into tableB (role) select distinct tableA.role from tableA
where
tableA.role not in (select tableB.role from tableB)
Christoph
-----Original Message-----
From: phil_hhn [mailto:time_lord@...]
Sent: Wednesday, 16 June 2004 9:40 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: How can I insert a range of rows from one table into another?
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@t...> wrote:
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...
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129rafbus/M=298184.5022502.6152625.3001176/D=groups/S=1705115386:HM/EXP=1087429217/A=2164330/R=0/SIG=11eamf8g4/*http://www.netflix.com/Default?mqso=60183350> click here
<http://us.adserver.yahoo.com/l?M=298184.5022502.6152625.3001176/D=groups/S=:HM/A=2164330/rand=892468106>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
where
tableA.role not in (select tableB.role from tableB)
Christoph
-----Original Message-----
From: phil_hhn [mailto:time_lord@...]
Sent: Wednesday, 16 June 2004 9:40 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: How can I insert a range of rows from one table into another?
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@t...> wrote:
> phil_hhn wrote:achieve...
>
> >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
> >Thanks, but maybe I simplified my problem too much ;-)
> >
> >
> Hi,
>
> insert into tableB select distinct role from tableA
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...
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129rafbus/M=298184.5022502.6152625.3001176/D=groups/S=1705115386:HM/EXP=1087429217/A=2164330/R=0/SIG=11eamf8g4/*http://www.netflix.com/Default?mqso=60183350> click here
<http://us.adserver.yahoo.com/l?M=298184.5022502.6152625.3001176/D=groups/S=:HM/A=2164330/rand=892468106>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]