Can someone help me?
I'm using Pg to access a postgres database for a web application. I have an
apparently robust database connection and have been using Pg::doQuery to
return a list-of-lists of the data
-all working OK.
However, I've been trying to process the following command without success:
select <some fields> from table1 where keyfield in (select keyfield from
table2);
This exact command returns the correct data when entered at the command
prompt in my POSTGRESQL interactive sql monitor but consitently returns no
data via the Pg::doQuery.
If I replace the nested select statement with a list of values then the
command works correctly, eg:
select <some fields> from table1 where keyfield in (15,17) ;
Is there some reason why the nested statement doesn't/cannot work with Pg?
How can I achieve the same result?
TIA
ian
Software versions:
PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66
Perl 5.005, patch 03