Join problem
Harry Terkanian <hterkanian-/[email protected]> Tue, 23 Nov 2004 19:51:23 -0800 (PST)
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <[email protected]> |
I am having a problem with a query which uses the IN
operator or a join:
cu.execute("SELECT column1 FROM table 1 WHERE
column2.table1 = column.table2")
-OR-
cu.execute("SELECT column1 FROM table 1 WHERE
column2.table1 IN (SELECT column FROM table2)")
When run fron the shell I get correct results; run
from within a module no rows are returned. (I have
verified the connection and cursor objects are OK by
running the SELECT that's in the IN clause in the
module immediately before the subject query and
getting correct results.
Python and PyPgSQL are both current. PostgreSQL is v
7.3 on OpenBSD. Same results running the module fron
a command line and within IDLE and Boa-constructor.
Any suggestions as to where to look greatly
appreciated.
Harry Terkanian
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/