Hello:

How do I get only a few columns from a query object?

q = session.query(Document).select_by(Complete=False)

would give me a list of rows (all columns) where Complete == False.

I have seen the select([doc.c.name]) notation but it doesn't work for
me.

select([docs.c.DocID]).execute()

Gives me:
sqlalchemy.exceptions.InvalidRequestError: This Compiled object is not
bound to any engine.

And:
select([docs.c.DocID], bind=db).execute()

Gives:
TypeError: __init__() got an unexpected keyword argument 'bind'


Thanks!


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to