Template tables are not 'Auto created'. So your logic wont' work. Why don't you catch the name of the table in a while loop and execute one by one. Also when you say different new target databases do you access different target 'databases'? In that case you need to create aliases.
↧