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