-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Why not write a function that converts the LOC number to an integer, such that sorting on those integers will sort the numbers correctly? Apparently you can even build an index on this type of function now, to accelerate the sort.
cvt_loc(TEXT) -> INTEGER
ORDER BY cvt_loc(loc_num)
or something like that...
On Jan 19, 2005, at 6:35 PM, Rick Schumeyer wrote:
-----Original Message----- From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general- owner@xxxxxxxxxxxxxx] On Behalf Of Mike Rylander Sent: Wednesday, January 19, 2005 6:10 PM To: Rick Schumeyer; PgSql General Subject: Re: sorting library of congress numbers
On Wed, 19 Jan 2005 17:37:20 -0500, Rick Schumeyer <rschumeyer@xxxxxxxx>
wrote:
I have a table where one of the columns is a library of congress number.
I would like to be able to ORDER BY this column.
First off, by LOC numbers do you mean Title Control Numbers like "o00325992" or "i0824506030" with an optional vendor name in front of them?
I mean the library of congress classification numbers. For example, the book "PostgreSQL" by Douglas & Douglas has the classification: QA76.9.D3 D685 2003
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx
- ----------------------------------------------------------- Frank D. Engel, Jr. <fde101@xxxxxxxxxxx>
$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFB7vdJ7aqtWrR9cZoRAvd9AJwO9Ev7ZaU3IEXtssjmV6pyj5VcbwCcCtcL oNbZSA44H4GVfGXMGC5tFZM= =coyv -----END PGP SIGNATURE-----
___________________________________________________________ $0 Web Hosting with up to 120MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org