Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BEDF847718C for ; Wed, 29 Jan 2003 04:22:47 -0500 (EST) Received: from localhost.localdomain (unknown [216.31.142.3]) by postgresql.org (Postfix) with ESMTP id 6577C479C13 for ; Wed, 29 Jan 2003 03:43:07 -0500 (EST) Received: from larubber.com (server [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with SMTP id h0T9HpP21941; Wed, 29 Jan 2003 01:17:51 -0800 Received: from 216.86.192.34 (SquirrelMail authenticated user ddurst) by www.la-rubber.com with HTTP; Wed, 29 Jan 2003 01:17:51 -0800 (PST) Message-ID: <36005.216.86.192.34.1043831871.squirrel@www.la-rubber.com> Date: Wed, 29 Jan 2003 01:17:51 -0800 (PST) Subject: Re: LONG - Question on dealing w/ numerics From: "David Durst" To: In-Reply-To: <19082.1043813296@sss.pgh.pa.us> References: <34281.216.86.192.34.1043801682.squirrel@www.la-rubber.com> <19082.1043813296@sss.pgh.pa.us> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: Reply-To: ddurst@larubber.com X-Mailer: SquirrelMail (version 1.2.7) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/477 X-Sequence-Number: 11342 > "David Durst" writes: >> insert into journal_lines >> (entry_id,account_id,line_type,line_amount) >> values (eid,aid,ltype,amount); >> select into line * from journal_lines where entry_id = eid AND >> account_id = aid AND ltype = ltype; > > I bet that last should be line_type = ltype? Just to let you know, changing ltype to line_type fixed the problem. But I still think your point about the function selecting more than one line is valid. The problem is, the journal_line_id is not created until the insert occurs and there is no other unique ident than the journal_line_id.