unfortunately it requires a bugfix, r4031: s = select([(func.max(task.c.sequence) +100).label('value')]).union(select([literal(100.0).label('value')])) print select([func.max(s.c.value)])
On Jan 8, 2008, at 4:37 PM, Jonathan LaCour wrote: > > I have been banging my head against the wall for a little bit > attempting to translate this SQL: > > SELECT max(value) FROM ( > SELECT max(sequence)+100 as value FROM task > UNION > SELECT 100.0 as value > ) > > into an SQLAlchemy expression that I can embed into an INSERT. > Should I just go ahead an use text() rather than bother with > attempting to construct this using an SQLAlchemy expression? > > (Yes, I know that this is gross...) > > -- > Jonathan LaCour > http://cleverdevil.org > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---