Is there a better answer than making sure the mixed keys have enough leading
zeros in the numeric sub-field to suppress the string comparison effect?

ergo (if you know you will never have ten thousand records):

XY-0001-BLAH
XY-0002-BLAH
XY-0003-BLAH
XY-0004-BLAH
XY-0005-BLAH
XY-0006-BLAH
XY-0007-BLAH
XY-0008-BLAH
XY-0009-BLAH
XY-0010-BLAH
XY-0011-BLAH
XY-0012-BLAH
XY-0013-BLAH

is the orthodox approach, and should work.

But if there were some way to count off the number of lead non-numeric
characters and let the comparison function soft-parse the numeric sub-field,
Chris's semi-numeric keys should work. Or, providing some way to escape from
the standard comparison function to a custom function should also work.

Squeezing the syntax for this kind of custom key comparison into SQL might
not be easy.

I didn't see any evidence of custom comparisons in a quick search of the
manual ...

Chris Aitken" <[EMAIL PROTECTED]> asked:


>
> Hi All,
>
> Ive been searching the archives and the documentation but dont really know
> the terminology im looking for, or even if its do-able or not so I figure
I
> would just ask here instead......
>
> I have a list of records in a table, and one of the fields is alpha
> numeric. They look like this.......
>
> XY-1-BLAH
> XY-2-BLAH
> XY-3-BLAH
> XY-4-BLAH
> XY-5-BLAH
> XY-6-BLAH
> XY-7-BLAH
> XY-8-BLAH
> XY-9-BLAH
> XY-10-BLAH
> XY-11-BLAH
> XY-12-BLAH
> XY-13-BLAH
>
[snipped]

Joel Rees
[EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to