I am trying to get data from a table whose name is in another table.
select * from (select tab1.value from tab1 join tab2 on tab1.id = tab2.id )
When i try this i get tab1.value instead of the outer select *
Is there a way to get data from the outer select ?
let me break this into two sql statements to make is little easier
1) select tab1.value from tab1 join tab2 on tab1.id = tab2.id
use the tab1.value from above as table name for 2)
2) select * from tab1.value