[thelist] SQL Order By Clause

Michele Foster michele at wordpro.on.ca
Wed Jul 25 18:54:51 CDT 2001


----- Original Message -----
From: "Scott Dexter" <sgd at ti3.com>


| > I would like to order the Item No. column in numerical order, such as
| > 1,2,3,4 instead of the order it is in now, 1, 10, 100, etc.
| > This field is
| > text (see the end, text entries).
| >
|
| Whaddya doin with that field being text??


Because, not all of the ID's are numeric .. some start with a unique Letter,
and some have letters added to the end of numbers, to indicate the same
number for more than one product ID internally.  I'll have to check with the
client to see what is more important for their use.

|
| yer SOL with it being a text field, because the Order By is using an
| alphanumeric sort, not a strict numerical sort.

Thought as much .. but I was wondering if whatever it was that was added to
the user drop down box on weo, that changed the sort from A-Z,a-z to A,a -
Z,z would do the trick in this case.  I just couldn't remember what the
parameter that was added after the ASC was, and/or if there were additional
parameters.

|
| Not sure if doing a CAST or CONVERT will get it sorted properly, but the
| first thing I'd do is look into the pain of changing that field to a
| numeric (if possible)....


We'll see ... looking at the data again, immediately, I don't see a logical
way to represent two parts and unique suppliers other than what is there
already.


|
| (my quick 2 cents before bugging out to play rollerhockey)

Enjoy, have fun!!!

Thanks,

Michele








More information about the thelist mailing list