Of Ken Corey
> Sent: Monday, July 29, 2002 20:59
> To: Peter Atkins
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: [SQL] Returning PK of first insert for second insert use.
>
>
> On Mon, 2002-07-29 at 19:32, Peter Atkins wrote:
> > I have two tables t_proj, t_task see bel
On Mon, 2002-07-29 at 20:52, Peter Atkins wrote:
> Is there a possibility of another application accessing the DB and using the
> id before my function has completed the transaction? I'm concerned with the
> possibility of cross-over of ID's if the insert hangs.
>
> There's no way to return the i
On Mon, 2002-07-29 at 19:32, Peter Atkins wrote:
> I have two tables t_proj, t_task see below:
>
> CREATE TABLE t_proj (
> proj_id SERIAL NOT NULL,
> PRIMARY KEY (proj_id),
> task_id integer(12),
> user_id integer(6),
> title varchar(35),
> description varchar(80)
> );
>
> CREATE TABLE t_task (
You need to do something like this:
SELECT proj_id FROM t_proj WHERE oid=xxx;
To find value of primary key from oid.
Chris
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Atkins
> Sent: Tuesday, 30 July 2002 2:33 AM
> To: '[EMAIL PROTECTED]
Thank you for explaining that in detail it makes sense now. I'll give it a
try.
Thanks again!
-p
-Original Message-
From: Ken Corey [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 1:05 PM
To: Peter Atkins
Cc: '[EMAIL PROTECTED]'
Subject: RE: Returning PK of first insert for second