I am having a problem that I am not able to figure out. Maybe someone
else can see what I am doing wrong. I am building a query using the
SQL expression language. Then printing the SQL statement and counting
the resulting records. When I run the generated SQL statement in the
command-line MySQL client it yields 100's of results. The problem is
that the count that the script prints out is 0. I have included the
code below:
sel = select([table])
sel = sel.select_from(table.join(listing, table.c.col_sysid ==
listing.c.sysid))
sel = sel.where(table.c.last_tr_date != listing.c.modified_date)
print "SQL: " + sel
result = conn.execute(sel)
count = 0
for row in result:
count = count + 1
print "Count: " + str(record_count)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---