Re: select statment from db with more than one order by clause

"Jonathan Ellis" <[email protected]> Mon, 02 Oct 2006 09:29:16 -0700
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Pretty much everything in SqlAlchemy requires primary keys to be
defined.

SA does support composite keys, though; you probably don't have to
create a surrogate key unless your design isn't normalized.

On Mon, 2 Oct 2006 10:25:50 +0100, "Mary Jane Boholst"
<[email protected]> said:
> Sqlalchemy does not seem to like the order by argument which I suspect
> has 
> something to do with the lack of primary keys in the table that I am
> trying 
> to access. Is it necessary to have primary keys defined for this
> statement to 
> work or have I misunderstood? 
> Thanks very much once again.
> MJ
> On Saturday 30 September 2006 04:24, Jonathan Ellis wrote:
> > just put more than one column in the order list:
> >
> > db.users.select(order_by=[db.users.c.name, db.users.c.email])
> >
> > On Fri, 29 Sep 2006 11:06:59 +0100, "Mary Jane Boholst"
> >
> > <[email protected]> said:
> > > Hi,
> > > I am trying to use sqlsoup to select items from a table in a database
> > > from within a .spy file, however I need to be able to specify two order
> > > by clauses and do not seem to be able to do this. Does anyone have any
> > > suggestions as to how I might go about this.
> > > Sorry if I am not making much sense. Let me know if you need me to
> > > explain a bit better.
> > > Thanks in advance,
> > > MJ
> > >
> > > -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > > your
> > > opinions on IT & business topics through brief surveys -- and earn cash
> > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Spyce-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/spyce-users
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Spyce-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spyce-users
-- 
C++ is history repeated as tragedy. Java is history repeated as farce.  --Scott McKay


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV