Logic Sort Order

Discussion in 'Java' started by Wojtek, Nov 20, 2008.

  1. Wojtek

    Wojtek Guest

    Have you ever noticed that false logic always sorts before positive
    logic (I am speaking about SQL "order by" on a char(1) column).

    False
    True

    No
    Yes

    0
    1

    So to sort by true first you either always include "desc", or use an
    artificial construct like:
    true -> a
    false -> b

    --
    Wojtek :)
     
    Wojtek, Nov 20, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soren Kuula
    Replies:
    2
    Views:
    805
    Soren Kuula
    Feb 1, 2004
  2. nobody
    Replies:
    0
    Views:
    720
    nobody
    Jun 1, 2004
  3. incredible
    Replies:
    9
    Views:
    892
  4. =?iso-8859-1?Q?=22Orlando_D=F6hring=22?=

    [B,IX] = sort(A,...) - Order for sort()-function

    =?iso-8859-1?Q?=22Orlando_D=F6hring=22?=, May 29, 2007, in forum: Python
    Replies:
    0
    Views:
    456
    =?iso-8859-1?Q?=22Orlando_D=F6hring=22?=
    May 29, 2007
  5. spike
    Replies:
    8
    Views:
    1,809
    Steve Holden
    Feb 9, 2010
  6. cspoh
    Replies:
    0
    Views:
    425
    cspoh
    Jul 31, 2003
  7. Navin
    Replies:
    1
    Views:
    1,127
    Ken Schaefer
    Sep 9, 2003
  8. robert
    Replies:
    1
    Views:
    176
    Martin Honnen
    Aug 23, 2003
Loading...