> -----Original Message-----
> From: Ken [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 23, 2008 4:10 PM
> To: sqlite
> Subject: [sqlite] order by issue?
> 
> I'm not sure if this a bug or if working as intended:
> 
> the order by b,a seems to cause B to use asc.. Instead of the desc as
> written in the order by statement.
> 
>  create table tst (a integer, b integer );
> sqlite> insert into tst values(1,1);
> sqlite> insert into tst values(1,2);
> sqlite> insert into tst values(1,3);
> sqlite> insert into tst values(2,3);
> sqlite> insert into tst values(2,2);
> sqlite> insert into tst values(2,1);
> sqlite> select * from tst order by b, a desc;
> a|b
> 2|1
> 1|1
> 2|2
> 1|2
> 2|3
> 1|3

Could be that I'm too tired again, but that looks to me like you asked
for order primarily by b (with the default, ascending, order) and
secondarily by a (with inverted/descending order).

select * from tst order by b desc, a desc;

might be what you were wanting?

-- James


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to