I need a select from a dynamic database in a view, so no declare could be done.
select * from (select db_table from systables where id = 6)
The result of select db_table from systables where id = 6 is my table e.g. table16.
So the above query should be like:
select * from table16
I already tried to concat the query to get a varchar but then I get the error at "concat", cause it isn't a object.
Any ideas?
select *, without even filtering the data? Why not query the table(s) directly?