Pl/Sql Function Body Returning SQL Query problem
XYZ123Feb 20 2009 — edited Feb 23 2009Hi,
I have a function that returns an sql string. I have printed by using PLSQL process as "On Load Before Header".
That sql was printed at header of page, and i then copy and paste that sql and run it from plsql developer, there is no problem.
But, i want to prepare a dynamic report that calls that function and my report is "Pl/Sql Function Body Returning SQL Query", process is :
declare
vsql varchar2(30000);
BEGIN
return lcr_report_evaluater.return_sql('23:90:43','01.01.2009','02.01.2009',24);
END;
When i put that code as region source, i am getting this error when page is opened:
failed to parse SQL query:
ORA-00933: SQL command not properly ended
I am sure that function returns true sql, i have tried it through printing its value to header of page, also i've tried that i can insert returning sql to a table. But why my report can no be created?
Thanks for responses.