Re: Order By

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 19 Apr 2006 20:52:26 -0700
Message-ID: <1145505146.447567.53850_at_g10g2000cwb.googlegroups.com>


Gene Wirchenko wrote:
> On 19 Apr 2006 17:50:00 -0700, "Marshall Spight"
>
> >3) If your DBMS supports it, you could try to order by the
> >result of some function of the itemcode. Sorta like
> >
> > select ... order by first_part(item_code), second_part(item_code);
>
> Kludgy.

Ha! It reminds me of that time in "Enter the Dragon" when the evil overlord Han sees Jim Kelley dispatch a bunch of his guards. He says, "Your style is crude." Kelley responds with "... but effective."

Yes, it is kludgy. But effective. :-)

> 4) If youo have the choice, have the numeric string parts be of fixed
> size as in 002240-01, 002240-02, 002240-03, . . ., 002240-09,
> 002240-10, 002240-11, . . . . If you do this, make sure that you
> know the maximum size needed, and add leading zeroes as needed. (The
> above will work up to -99.)

Nice!

Marshall Received on Thu Apr 20 2006 - 05:52:26 CEST

Original text of this message