Proper way to sort by ISBN??


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Matthew Raehl on March 28, 2001 at 16:19:01:

Maybe I missed it, but I'm not sure I know how the ISBN's are supposed to be sorted. Say you have 3 ISBN's:

0-22-103488-2
0-145-43481-1
0-221-03445-2

are they to be sorted as one long number, without the dashes, or sorted first in order of the first number, then the second number, and so on? Which is the correct order:

0-145-43481-1 (0145434811)
0-221-03445-2 (0221034452)
0-22-103488-2 (0221034882)
or

0-22-103488-2
0-145-43481-1
0-221-03445-2
( 22 < 145 < 221 )

also, will an ISBN always have 3 "-"s, and a total of 10 other charachters? Some of the ISBN's have a character at the end, should this be considered greater than or less than a number? where else in an ISBN can a character appear? Or, can we just treat the ISBN as a string and sort it however the < operator for the string object sorts it?


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]