What you have is a list of Row objects:
http://code.google.com/p/pyodbc/wiki/Rows
Rows are tuple-like objects, and in your case they contain a single
"column". The column value can be accessed in two ways: (1) like a
tuple by indexing, row[0] or (2) using the column name from the SQL
statement, row.data.
To extract them all, I'd recommend a quick list comprehension:
rows = cursor.execute(...).fetchall()
values = [ row.data for row in rows ]
Since cursors are iterable, you can also do something like:
values = [ row.data for row in cursor.execute(...) ]
The previous code created two lists: `rows` and `values`. This one
only creates a single list by iterating over cursor and adding to the
`values` list one row at a time.
Also, notice there is no fetchall(); it is iterating over the
execute() return value which is simply the cursor itself. That means
you can also break it into two lines if it is too unwieldy:
cursor.execute(...)
values = [ row.data for row in cursor ]
I hope this helps. Good luck!
Michael Kleehammer