[cx-oracle-users] Query returns zero rows via cx_oracle but some from sql developer
Brought to you by:
atuining
From: Himanshu <him...@gm...> - 2011-03-01 09:42:25
|
Hi, The following code doesn't return any rows but the same query returns 300+ rows when run from sql developer. What could I be missing? How to debug this? import cx_Oracle # snipped setting up connection_string connection = cx_Oracle.connect(**connection_string) cursor = connection.cursor() cursor.execute(''' SELECT s.hasc, status, sum(count) FROM a_counts m JOIN geo g ON m.geo_id = g.id JOIN cities c ON c.accent_city = g.city JOIN statoids s ON s.capital = g.city WHERE log_date >= '10-Feb-11' AND log_date <= '10-Feb-11' AND g.country = 'IND' GROUP BY s.hasc, status ''') print cursor.fetchall() Thank You, Himanshu |