On Oct 23, 2008, at 8:58 AM, ershadul.hoque wrote:

>
> journals table has id column
> ledgers table has journal_id column
>
> consider that: journals table is mapped in
> Class Journal(object):
>    pass
> and similarly ledgers as :
> Class Ledger(object):
>   pass
>
> Now i want to run this query ( it runs successfully in mysql):
>
> select * from (select * from journals limit 2,6) as some_journal inner
> join ledgers
> on some_journal.id = ledgers.journal_id
>
> please help me.



sess.query(Journal).limit(6).offset(2).from_self().join((Ledger,  
Journal.id==Ledger.journal_id))

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