Subject | Re: insert and select with Union |
---|---|
Author | Marco Menardi <mmenaz@lycosmail.com> |
Post date | 2002-12-29T01:23:52Z |
Because I have to avoid duplicate (same elements can be in both
tables), and UNION does an automatic distinct. Moreover, the statement
is into a dsql component, so I would need two components with two
statements instead of a simple one
regards
Marco Menardi
--- In ib-support@yahoogroups.com, Doug Chamberlin <yahoogroups@a...>
wrote:
tables), and UNION does an automatic distinct. Moreover, the statement
is into a dsql component, so I would need two components with two
statements instead of a simple one
regards
Marco Menardi
--- In ib-support@yahoogroups.com, Doug Chamberlin <yahoogroups@a...>
wrote:
> At 12/28/2002 06:37 PM (Saturday), Marco Menardi <mmenaz@l...> wrote:statements? Try
> >insert into mytable (x,y,z)
> >select a, b, c
> >from Atable
> >UNION
> >select a, b, c
> >from Btable
>
> What is the reason you do not perform two separate INSERT
>
> insert into mytable (x,y,z)
> select a, b, c
> from Atable;
>
> insert into mytable (x,y,z)
> select a, b, c
> from Btable;