I am making a report where the user chooses the names of tables he wants to select data from. I have to fetch data from these tables and upload the data as flat files to application server.
When writing the report, 2 things are unknown : name and number of tables. As the internal table also depends on the table, the structure will be unknown too.
Is there a way in which I can only write one select statement and it can be reused.
Select * from [table name] into table [internal table name of same format].
where I can update the table name and internal table (which should be of the same format as the table) .