Re: [GENERAL] Sequence value

2000-12-15 Thread Roger Wernersson
You could try INSERT INTO koe (id, name) SELECT nextval('koe_pkey_id'), 'uusi'; or something like that. /Roger Esa Pikkarainen wrote: > > So, I want to insert new record and get immediately its sequence > value (serial column) (or OID). I Use iHTML web interface. > Now I have found out that I

Re: [GENERAL] Sequence value

2000-12-15 Thread Alessio Bragadini
Esa Pikkarainen wrote: > but unfortunately it did not solve my problem. Now I have no access > to the value of nextval('koe_pkey_id'). This query does not return > any recordset. Sorry, I didn't check this requirement. > Is it possible to embed Insert query as a subquery into a Select > query?

Re: [GENERAL] Sequence value

2000-12-15 Thread Esa Pikkarainen
Thank you, Yet another way to do it ;-) but unfortunately it did not solve my problem. Now I have no access to the value of nextval('koe_pkey_id'). This query does not return any recordset. Is it possible to embed Insert query as a subquery into a Select query? I have not managed to dot it. I m

Re: [GENERAL] Sequence value

2000-12-15 Thread Alessio Bragadini
Esa Pikkarainen wrote: > SQL ="SELECT nextval('koe_pkey_id') as val; > INSERT INTO koe (id, name) values (val, 'uusi');" INSERT INTO koe (id, name) (SELECT nextval('koe_pkey_id'), 'uusi'); -- Alessio F. Bragadini[EMAIL PROTECTED] APL Financial Services http://village

[GENERAL] Sequence value

2000-12-14 Thread Esa Pikkarainen
So, I want to insert new record and get immediately its sequence value (serial column) (or OID). I Use iHTML web interface. Now I have found out that I can give two queries in iHTML like this: SQL ="SELECT nextval('koe_pkey_id') as val; INSERT INTO koe (id, name) values (val, 'uusi');" No