> how is calling query(colmames)...all() significantly different from simply 
> saying execute(..).fetchall() ?  you get a list of named-tuple like objects 
> in both cases.

You are correct, execute().fetchall() does already returns a list of
rows, where each row has attributes. I was initially using execute()
and couldn't pass in the myresults[5] so I assumed this was returning
a list of results strings and not tuple, but they do.

I will use fetchall, and I am able to use myresults[5].customername

I'll update my docs with these example.
http://lucasmanual.com/mywiki/PythonManual#sqlalchemyandmssql

I wonder if passing arguments like this is mssql specific
(@some_input_parameter) , or it can be reused in other databases, like
mysql or postgre?

myresults=session.execute("assp_ReportDailyTransactions
@start_date=:start,@end_date=:end",
params={'start':"20100701",'end':"20100719"})

Thanks a lot.
Lucas


--
How to setup unix odbc for use with sqlalchemy and mssql
http://lucasmanual.com/mywiki/unixODBC

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to