I'm trying to do an "insert... select" to get data from multiple tables matching certain criteria into a temporary table. I'd then like to order the data in the temporary table, but look at each entry in the table and know what table it came from originally. I was thinking there must be some way to return the table name in the select statement, anyone know if this is possible?
like:
(what goes in place of <find tablename>?)
thanks
like:
Code:
insert into temptable select date, <find tablename> as originalname from table1;
thanks