[sqlalchemy] Re: join two selects

2008-05-22 Thread Michael Bayer
On May 22, 2008, at 5:51 PM, Jeff Putsch wrote: Which can give me two selects using aliases: a1 = s.correlate(None).alias() a2 = s.correlate(None).alias() But every attempt at using a1 and a2 in a select with a join is failing for me. a1.join(a2, onclause) should do it. if not, supply

[sqlalchemy] Re: join two selects

2008-05-22 Thread Jeff Putsch
On May 22, 2008, at 3:08 PM, Michael Bayer wrote: a1.join(a2, onclause) should do it. if not, supply a full test case and a description of the specific problem. OK, I guess. So how do I see the SQL that gets generated? I've tried this: print select(from_obj=[a1.join(a2), a1.c.eid ==

[sqlalchemy] Re: join two selects

2008-05-22 Thread Jeff Putsch
I apologize for this second, longer, more detailed, post, but I thought my first response to the request for more descriptions was incomplete... On May 22, 3:08 pm, Michael Bayer [EMAIL PROTECTED] wrote: a1.join(a2, onclause) should do it.  if not, supply a full test case   and a description