[ic] Custom sort algo, sort on filtered data, or concatenate two sorted queries?

John A. john at virginiaquilter.com
Fri Jan 29 05:59:08 UTC 2010

I want to thank everyone who replied. Sorting primarily by the results
of LIKE and secondarily by the colors column worked like a charm.


... order by colors NOT LIKE "red%", colors

I'm new to SQL and hit on this after the 1st digest after my post, so
it somehow never occurred to me to see if there was an
ascending/descending sort order option. So what would be faster/more
efficient: NOT LIKE or DESC? (I suppose it could very well vary with
the implementation of SQL.)

In any case, it lets me have, in this example, everything with red in
the colors listed, with those starting with red first. Just what the
doctor ordered. Fortunately, we have no color names that start with
other color names, so we don't have that scenario to deal with.

The next stage is making a page with the list of colors and links to
their various page #s from their more lists. I'll poke around at it
and give you guys a holler if I get stuck. (I've already decided I
want to have some other data stored for each color - descriptions etc.
- so I'll be creating a table that will help things.)

Again, thanks!

More information about the interchange-users mailing list