Subject RE: [firebird-support] INSERT Multiple Rows same SQL Statment
Author Sasha Matijasic
>
> >Those are constants. Something like this:
>
> >insert into ...
> >select 'foo', 42 from rdb$database ...
>
> You are asking me to do something like this:
>
> 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.
>

Well, not exactly asking, just trying to help :)

Notice rdb$database in my example. It's a system table guaranteed to have exactly one row. The columns of that table are not important for this, since you will not be selecting any of them.
So, try this query:

select 'USD', 'EUR', 2008, 0.93 from rdb$database union all
select 'BLR', 'AUD', 2007, 0.93 from rdb$database;

You will get 2 rows with 4 columns. Right?

Now, do this:

insert into tbcurrencyquotes(basecurrency,quotecurrency,currencyquoteyear,price)
select 'USD', 'EUR', 2008, 0.93 from rdb$database union all
select 'BLR', 'AUD', 2007, 0.93 from rdb$database;

Those 2 rows will be inserted into tbccurrencyquoutes table.

Sasha