Oops! >>> type(case) <class 'sqlalchemy.schema.Table'>
I was looking at the case statement parameters, and ignoring what Python was *really* complaining about! I gave the "case" table a different name and now I am back on track. By the way, it's been a real pleasure learning SQLAlchemy given the excellent documentation. On Jan 13, 10:46 am, aoeuhtns <psalvat...@gmail.com> wrote: > Hello, > > I am relatively new to SQLAlchemy, and I am only really interested in > the SQL Expression Language for now. I am having trouble creating > case statements. > > SQLAlchemy version: 0.5.7 > Python version: 2.6.2 > > Here is the error I am getting: > > >>> type(mco) > > <class 'sqlalchemy.schema.Table'>>>> type(mco.c.abbreviation) > > <class 'sqlalchemy.schema.Column'>>>> x = case([(mco.c.abbreviation != None, > mco.c.abbreviation)]) > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: 'Table' object is not callable > > The actual statement I want to create is more complicated, but this is > a simplified version. I've tried a few random ideas, but I keep > getting this message. > > Thanks
-- 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.