problem with my insert

From: Michael Zouroudis <mzouroudis(at)idealcorp(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: problem with my insert
Date: 2002-08-12 18:11:06
Message-ID: 3D57FA3A.1010609@idealcorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


thank you for answering my question. it didn't work quite as expected
though. the insert statement just doesn't want to work. what i ended
up doing is using a select into statement to assign variables to both
ids', like this;

select currval (''mom_mom_id_seq'') into x;

select currval (''dad_dad_id_seq'')into y;

raise notice ''last value of mom_id %'' x;

raise notice ''last value of dad_id %'' y;

this returns a value for both x and y. when an insert statement is
added though;

insert into mom_dad(mom_id, dad_id) values (x, y);

i get an error message that says there is a parse error at
or near $1. i suppose the argurment causing the error is the insert,
since this message does not come up when i comment it out. if i'm doing
something wrong, i don't know what. please help.

thanks again in advance,

mike zouroudis

--
Mike Zouroudis

Intern

__________________________________________________

I.D.E.A.L. Technology Corporation - Orlando Office

http://www.idealcorp.com - 407.999.9870 x14
--

Browse pgsql-admin by date

  From Date Subject
Next Message Juancho 2002-08-12 19:57:32 Precision when substracting two values with SQL
Previous Message Elielson Fontanezi 2002-08-12 13:48:29 J2EE with PostgreSQL