Hey all. I've got the following set of tables which is variable and adds up every day:
data-2010-10-10
data-2010-10-11
data-2010-10-12
data-2010-10-13
And so on. All the tables have the same structure and what I'd like to do is select stuff from all tables at once. I'm unable to use a MERGE table since I'm running InnoDB. Anyways, I'm using the following statement to select the table names from my information_schema:
select table_name from `information_schema`.`tables`
where `table_schema` = 'mydb2' and `table_name` like 'data-%'
Which return all the tables I'd like to unite. I can also group_concat the returned results to get the listed with a comma as a separator. Now where I'm stuck is running a select query that would actually retrieve the data from these tables.
Any hints are appreciated. Thanks! ~ K