Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Posts
    64

    Unanswered: ordering "show tables"

    Is there any way to order the "show tables" command, or equivalent way of returning table info.

    I have a shell script that creates a new log table weekly, and copies data into the table created from a live data table.

    problem is, I've used the "show tables" command to find out what the existing table numbering is, and to give me a CSV list to alter the merge engine table that looks at these archive tables.

    the table list from "show tables" comes out as...

    log_1
    log_10
    log_2
    log_3
    log_4
    log_5
    log_6
    log_7
    log_8
    log_9

    dumping this into a txt file, and then getting the last record is obviously wrong now, due to how it's ordered.

    Is there any way to order the show tables using creation date or something?

    regards

    Andrew

  2. #2
    Join Date
    Sep 2004
    Posts
    64
    problem solved.

    renamed all the low number tables to

    log_01
    log_02 etc

    solved the ordering problem

  3. #3
    Join Date
    Oct 2004
    Location
    Paris, FRANCE
    Posts
    132
    Which is a slightly better idea

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •