On Tue, Feb 03, 2009 at 06:26:19PM +0530, Gurjeet Singh wrote:
> >
> > How about
> >
> >        order by decode(version, null, 1, 0), version
> 
> Yup... that'll work, but will mess up the ordering if more than one of
> version's values is non-null.
> 
> SQL> select * from t order by decode( a, null, 1, 0 );
> 
>          A
> ----------
>          1
>          2
>          4
>          3
> 
> 
> 
> 6 rows selected.

That's why my proposed solution was

        order by decode(version, null, 1, 0), version

not just

        order by decode(version, null, 1, 0)

Cheers,

-- 
Jan Pazdziora
Satellite Engineering, Red Hat

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to