Need to use Select List value as column name
440742Mar 22 2005 — edited Mar 31 2005I want to have a WHERE ? IS BETWEEN ? AND ? clause.
I am using the PL/SQL Query returning a SQL Query as a report. This uses bind variables for items I had set on my form..... If I hardcode something like:
'WHERE STARTDATE IS BETWEEN '||
'TO_DATE(:P1_START,''dd-MON-YYYY HH24:MI'') AND '||
'TO_DATE(:P2_END,''dd-MON-YYYY HH24:MI'')';
I have no problem, but I have 2 date columns, STARTDATE and ENDDATE, and would like to use the value in a select list and not have to hardcode "STARTDATE" in there. I have not been able to do this, does anyone know how to use a bind variable as a column name? From reading some posts I think it might not be possible.