Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting library codes

Status
Not open for further replies.

meristem

Technical User
Apr 2, 2000
2
US
Library codes usually consist of alternating<br>text and number fields dispalyed as a single<br>string. For example AB123.4df56GH99.<br>Problem is the numbers which have to be sorted numerically and then recombined as text.<br>&nbsp;I have a VB code routine which splits<br>the string into text and numeric fields, plugs them into an Access table which sorts them, and then recombines into a string. There must be a better way.
 
would that be the Dewey Decimal system?<br>if your current code works, how would you want it to work better? <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Ah the Dewey Decimal system comes from a time before computers.<br>Computers as we all know are for crunching large amounts of data. i.e. lots of books in a library.<br>If numbers and a manual system have reached there limits the its time to look at a state of the art system like Barcode tracking. You know tha UPC code is a stock number for Campbells soup.<br>Put a barcode on every book and a location barcode on every shelf and use a portable data collection unit to input it all to the PC.<br>Get rid of the Card Catalog and use a Computer to find your books by Author, ISBN, Title, and a dozen differnt other things that the Dewey Decimal systems never could.<br><br>Also why mix numbers and letters.<br>Just use all numbers and put dashes in them like your phone number<br>727-333-2002<br>The reason the dashes are in a phone number is to make it easier on us.<br>So number all of your books that way. Forget the letters.<br>We are in the new millennium. Not 1850<br>
 
I'm a bit confused. When I enter letter/number combinations in one field of a table, it sorts nicely, letters first, then numbers without splitting anything. Do you mean you must sort the numbers first even though they come after the letters? That suggests they are not subsets of the letters which would really confuse me.<br><br>As for DougP, my guess is that putting bar codes on all of the books in a library would be much more difficult than solving this coding problem. I thought the idea was to adapt computers to make our lives easier, not to adapt everyone's lives and work to make it easier on coders.<br><br><br><br>
 
CharlesDFW, <br>i agree with your thought about the sorting of alphanumerics, that was my initial thought also.&nbsp;&nbsp;but then again i could never find a book in the library.<br><br>as for adapting computers to make everyone's life easier, as oppossed to making programmers lives easier by adapting the way we do things, that really depends on if you're a programmer or not. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Don't all of your books have an ISBN number on them already???? There's your barcode.<br>That's why the Library of Congress use's it, cause they have to keep track of way more books than I can comprehend.<br><br>But to answer your sort question.<br>The computer sorts characters by ASCII equivalents<br>here is a short list.<br>Number 1 is ASCII code 49<br>The Uppercase &quot;A&quot; is 65<br>Lowercase &quot;a&quot; is 93<br>There are 255 characters and they all have an ASCII equivalent.<br>Now text or Strings as us Progrmmers call them are sorted down the entire first column then move to the top of the second column down it and so on.<br><br>Like so <br>1AB<br>2ZZ<br>AAC<br>AAD<br>ABC<br><br>Now 11 will be under 1 instead of 9<br>1<br>10<br>11<br>2<br>3<br>4<br>44<br>5<br>55<br>Thats the way TEXT sorts.<br>So when you mix them like Dewey did you get Mush in the computer.<br>Why do you care if the Dewey number is sorted anyway.<br>You are using Access to find informaton in a database.<br>So who cares if the books are in order.<br>Just click the binoculars and find your book.<br>It will show the Dewey number and ISBN and Author and what ever else you have in there.<br><br>Numbers on the other hand sort correctly. that's why most computer programs ask for a Number. Invoice Number, Customer Number, ISBN Book Number<br><br>Here is a WEB page with the ASCII characters.<br>They are only showing the first 128 of the 255<br><A HREF=" TARGET="_new">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top