Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^3: database sorter script

by hmerrill (Friar)
on Dec 06, 2004 at 12:42 UTC ( [id://412639] : note . print w/replies, xml ) Need Help??

in reply to Re^2: database sorter script
in thread database sorter script

There are at least a few free *real* databases around - one being PostgreSQL. I'm not sure what MySQL's current license situation is, but it might be free as well.

My advice is to convert your flat text file database into a real database so that you can use "LIKE" in your SELECT, something like this (as someone else already pointed out):

SELECT * FROM your_table WHERE author_last_name LIKE 'A%'
Actually, if your flat file database is CSV (Comma Separated Value) or similar, you might be able to use Perl's DBI and DBD::CSV modules to do what you want, and you might be able to use a SELECT similar to the one above that uses the "LIKE", but I'm just speculating ;-)


Replies are listed 'Best First'.
Re^4: database sorter script
by santander (Acolyte) on Dec 06, 2004 at 13:30 UTC
    To be more detail, database contain near 9000 records; top part contains some 'digital' names, then goes a normal alphabet.

    040 Feat Erica Baxter
    2 Brothers On The 4th Floor
    2 Eivissa
    2 Unlimited
    20 Fingers
    4 Clubbers
    4-2 The Floor
    60 Minute Man
    A Trance Communications Classic
    A. Kay B.J.
    A.D.A.M. Feat. Amy
    AB Logic
    Above and Beyond
      Your original message said your flat file database was a "Books" database where each book was listed with Author's Last Name and First Name - I don't see that in this data that you posted. How is your data organized? What data is present there? Where is the Book title? Where is the book author last name, first name?
        Yes, I have corrected the task a little, the given adatabase is more actual for me, it's artist database. Some names have 'digital' species, they are in the top of database, but then goes more or less organized alphabetic list.