Subject Re: [firebird-support] Newbie Firebird SQL Question
Author Myles Wakeham
> On 22-Feb-2005 00:21:26, Helen Borrie wrote:
> This is a bit topsy-turvey, but you could get it this way:
>
> insert into aTable (ID, data1, data2, category_ID)
> select
> gen_id(gen_aTable, 1),
> 'something',
> 'something else',
> (select id from category
> where description = 'The Text You Have')
> from rdb$database;

OK, this sounds like it would work. I am inserting a large number of rows
into a table that has a BEFORE INSERT trigger on it for its own ID, so that
should take care of the generator. The only thing that has been causing me
some grief is the ID from category, but I can see how you are doing it.

What is the reference to rdb$database? Should I use this verbatim, exactly
as you have stated it, or replace this with another value from my database?

Regards,
Myles

===============================
Myles Wakeham
Director of Engineering
Tech Solutions US, Inc.
(480) 451-7440
www.techsol.org