I have two tables one is BASE_TABLES with table_id, table_name, and a few other cols.
The other is BASE_TABLE_COLS with table_id, col_name, col_Alias
I would like to build a query based on the requisite table columns of the base tables.
that would be something like 'select '||col_name1||' , '||col_alias1||' ,...'||col_n||' from '||base_table ;
How could I build that query string in the procedure then execute into a ref_cursor?
Any assistance would be greatly appreciated.