Received: from s20.highertech.net (root@s20.highertech.net [209.54.120.20]) by hub.org (8.9.3/8.9.1) with ESMTP id LAA75977; Wed, 21 Apr 1999 11:43:17 -0400 (EDT) (envelope-from jt-kirkpatrick@mpsllc.com) Received: from kirkpatrickjt (whiteoak-34.highertech.net [209.140.56.34] (may be forged)) by s20.highertech.net (8.8.6/8.8.6) with SMTP id KAA29805; Wed, 21 Apr 1999 10:58:24 -0400 Received: by localhost with Microsoft MAPI; Wed, 21 Apr 1999 11:45:33 -0400 Message-ID: <01BE8BEC.76C02840.jt-kirkpatrick@mpsllc.com> From: JT Kirkpatrick To: "'pgsql-interfaces@hub.org'" , "'pgsql-sql@hub.org'" , "'chugalug@listserv.highertech.net'" Subject: perl and postgres. . . Date: Wed, 21 Apr 1999 11:45:32 -0400 Organization: MPS, LLC X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'm trying in perl to get a maximum value from a field in a postgres table: $query="select max(userseq) from dataentry;"; $result=$conn->exec("$query"); and then capture that value in a scalar variable: $userseq=($result); but it's not working. The field userseq is int4 if that matters to you. if I can capture that value in a variable then I can use it in an update query for that particular record. Can anyone enlighten me?? jt