Q:

strange results returned with unix odbc and pypyodbc

I have odbc set up to query a Microsoft SQL server instance. My SQL statement run's fine from the isql command line; however, when i use the same query in pypyodbc the results are incorrect. What's unique about my query is that I have a nested left join.
The dataset is basically some user login information; so i have a device table (hardware), a node table (software) and a user table (who's logged on to the node).
What my nested left join does is to create a new result for each user that has logged onto the device/node and, of course, return no user information if no one has logged on. As I mentioned, the SQL statement works on the command line; just not in my python script - from the python script it appends a user where from the command line it doesn't. Can someone help shed some light for me please?
My SQL Query:
SELECT

  deviceserialid AS serial,
  devicemanufacturer AS vendor,
  devicemodel AS model,

  nodecn AS nodename,
  nodeoperatingsystem AS os_value,
  nodeoperatingsystemversion AS os_version,
  nodelastlogontimestamp AS node_last_login,

  nodedeviceuseruserid AS user_id,

  ip.ipaddress AS ip_address,
  ip.ipmacaddress AS mac_address,

  [user].username AS user_name,
  [user].useremplid AS user_id

FROM
  nodedevice
  LEFT JOIN nodedeviceuser ON nodedeviceuser.nodedeviceusernodedeviceid=nodedevice.nodeid
    LEFT JOIN [user] ON [user].userid=nodedeviceuser.nodedeviceuseruserid,
  device, node 
  LEFT JOIN ip ON ip.ipnodeid=node.nodeid

WHERE
  nodedevice.nodeid=node.nodeid
  AND nodedevice.deviceid=device.deviceid

ORDER BY nodename, mac_address

My Python code:
def rows_to_dict_list(cursor):
    columns = [i[0].lower() for i in cursor.description]
    for row in cursor:
        try:
            d = dict(zip(columns, row))
        except:
            yield None

cursor.execute( <SQL_STATEMENT> )
for this in rows_to_dict_list(cursor):
    print "%s" % (this,)

A:

seems like there's a bug in pypyodbc; i swapped the module with pyodbc and it worked fine.

