[sqlalchemy] Re: sqlalchemy with turbogears and assign_mapper: select

2007-09-07 Thread Paul Johnston
Hi, >And if I wanted to select a year and group by year? >"select User.Year from User group by User.Year" > db.execute(select([User.Year]) ??? > > Have a look at http://www.sqlalchemy.org/docs/04/sqlexpression.html Paul --~--~-~--~~~---~--~~ You received this m

[sqlalchemy] Re: sqlalchemy with turbogears and assign_mapper: select

2007-09-05 Thread Lukasz Szybalski
> > Hi, > > >I am using turbogears with sqlalchemy and assign_mapper. > >How do I select one column only when doing a select statement? > > > > > Can I ask why you want to do that? Unless you're really speed critical, > selecting them all isn't too bad. > > But, if you're set on this, there are tw

[sqlalchemy] Re: sqlalchemy with turbogears and assign_mapper: select

2007-09-05 Thread Paul Johnston
Hi, >I am using turbogears with sqlalchemy and assign_mapper. >How do I select one column only when doing a select statement? > > Can I ask why you want to do that? Unless you're really speed critical, selecting them all isn't too bad. But, if you're set on this, there are two approaches: 1)

[sqlalchemy] Re: sqlalchemy with turbogears and assign_mapper: select

2007-09-05 Thread Lukasz Szybalski
Hello, I am using turbogears with sqlalchemy and assign_mapper. How do I select one column only when doing a select statement? d=model.Useraddress() How do I do: "select Address_Sid from Useraddress where User_Sid='30' " This d.select_by(USER_SID=30) will do select * from Useraddress where Use