order by instead of two queries (Apologies)
Leonardo B. Lopes
leo at iems.nwu.edu
Tue Mar 27 16:32:45 EST 2001
Somehow I sent this to the wrong place. Sorry about that, and thanks for
the answer anyway...
Leo.
On Tue, 27 Mar 2001, Bob Kline wrote:
> On Tue, 27 Mar 2001, Leonardo B Lopes wrote:
>
> > I have some data in a table that I would like to obtain order by a
> > specific instance of the data. ex:
> >
> > Name: Age:
> >
> > Joe 50
> > Jill 60
> > Jack 65
> >
> > What I would like to do is have a query that returns Jack first, then
> > the regular name order. Something like:
> >
> > SELECT Name FROM clients ORDER BY Name='Jack',Name
> >
> > Can this be done with one query?
>
> This can be done in standard SQL (using a CASE operation) but this is a
> Python mailing list, not a SQL list.
>
> --
> Bob Kline
> mailto:bkline at rksystems.com
> http://www.rksystems.com
>
>
========================================================================
Leonardo B. Lopes leo at iems.nwu.edu
Ph.D. Student (847)491-8470
IEMS - Northwestern University http://www.iems.nwu.edu/~leo
More information about the Python-list
mailing list