cross joins can be performed using implicit cross join.  no ON CLAUSE  
is needed:

select([a_o, b_o])


On Nov 21, 2008, at 6:49 AM, Ash wrote:

>
> Hello,
>
> I want to know how to implement the cross join using sqlalchemy
>
> I create the metadata say metadata
>
> i have table a and b which i want to cross join.
>
> a_o = sqlalchemy.Table('a',metadata,autoload=True)
> b_o = sqlalchemy.Table('b',metadata,autoload=True)
>
> j = join(a_o,b_o, onclause=a_o.c.b_id==b_o.c.id)
>
> This gives me the join thing
>
> select = sqlachemy.select(from_obj=[j],columns=[a_o.c.name])
>
> result = select.execute()
>
> output = result.fetchall()
>
> But this is not the cross join.
>
> Thanks in the advance.
> >


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