Hello,
So I basicly have a table which has a list of table names. All these listed tables have exact same structure.
Then I have a query template, with place holder for table name.
I need to create a view, which should return results of that query UNIONed from all the tables listed in that one setup table.
So far what I've done is create a user defined function, which would prepare a complete UNIONed SQL statement.
But this is where I'm stuck. I can't figure out how to execute it in a view and return whatever it returns..