I would like to run a query that uses a column value (in which a tablename is stored) to determine the tablename in a from clause of a subselect.
Something like that:
SELECT column_with_tablename,
(SELECT COUNT(*) FROM VALUEOF(column_with_tablename)) as numberofitems
FROM table1
I know that this is very fragile but i need it work. (I inherited a database that stores tablenames in a column)
Is there a way ?