Hi, I am trying to translate the following SQL into SqlAlchemy session syntax:
sql = ''' SELECT SUM(reg), SUM(ot), SUM(ce), SUM(hol), SUM(sklv), SUM(vac), SUM(ct), SUM(conv), SUM(misc) FROM tbl_TimeEntries WHERE dateworked > = '%s' AND dateworked <= '%s' AND empid = %s ''' % (start_date, end_date, emp_id) I found the "apply_sum" query method, but this seems to be able to only be applied to one column at a time. I haven't found a way to use equality operators (>= or <=) yet. According to the SqlAchemy book by Copeland, I should be able to use the equality operators with table methods and the bitwise "&" operator. I prefer using sessions since they seem easier to clean up in wxPython, but I'm pretty flexible. Any hints are welcome. Thanks! Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---