Struggle with syntax
select 'select timepoint, space_usage, space_alloc, quality from table(dbms_space.object_growth_trend(' ||"' owner'" ||',' ||"' table_name'" ||','"'TABLE'"')
);' from dba tables where owner='USER';
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
I am not sure where I might missed a quote.
But I intend the query to return me the following:
select timepoint, space_usage, space_alloc, quality from table(dbms_space.object_growth_trend('SCHEMA','TABLENAME','TABLE'));
But I am not sure what I need to use as escape to print the single quote. I used the double quote outside of the single quote and obviously it is not working right. Any SQL gurus has any suggestions? Thanks.