Subject | Res: [firebird-support] INSERT Multiple Rows same SQL Statment |
---|---|
Author | Luis Carlos Junges |
Post date | 2008-09-24T16:07:15Z |
>Those are constants. Something like this:You are asking me to do something like this:
>insert into ...
>select 'foo', 42 from rdb$database ...
SQL> insert into tbcurrencyquotes(basecurrency,quotecurrency,currencyquoteyear,
price) select 'AUD','USD',2009,2 from tbcurrencyquotes union all select 'BRL','U
SD',2009,4 from tbcurrencyquotes;
it does not give any error, but also not insert nothing.
SQL> commit;
SQL> select * from tbcurrencyquotes;
---
Luís Carlos Dill Junges ©
"A realidade de cada lugar e de cada época é uma alucinação coletiva."
Bloom, Howard
----- Mensagem original ----
De: Sasha Matijasic <selectnull@...>
Para: firebird-support@yahoogroups.com
Enviadas: Quarta-feira, 24 de Setembro de 2008 11:45:36
Assunto: RE: [firebird-support] INSERT Multiple Rows same SQL Statment
>Those are constants. Something like this:
> >I think it's easier like this:
> >insert into table_ (field1, field2)
> >select val1_1, val2_1 from rdb$database union all
> >...
> >select val1_2, val2_2 from rdb$database;
>
> Agree, as far as you have the tables with the source data.
>
insert into ...
select 'foo', 42 from rdb$database ...
Sasha
Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @... ou @....
http://br.new.mail.yahoo.com/addresses
[Non-text portions of this message have been removed]