Home » Developer & Programmer » Reports & Discoverer » Column name as parameter (Oracle10G, Windows)
Column name as parameter [message #410498] Sat, 27 June 2009 11:42 Go to next message
sudd13
Messages: 5
Registered: June 2009
Junior Member
select * from emp where hdate between 01/01/09 and 01/02/09;

I need to pass the column name as parameter as well as the values like----

select * from emp where &hdate between :f_dt and :l_dt;

Here in form report builder 10G &hdate are not accepted as column name. But where as colon it's accepted at report builder like--------

select * from emp where :hdate between :f_dt and :l_dt;

but not showing any data. Can anyone help me????
Re: Column name as parameter [message #410501 is a reply to message #410498] Sat, 27 June 2009 12:52 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Try this as the query.
select * from emp
&where_clause ;
In Before Report trigger:
where_clause := 'where ' || :hdate || ' between ''' || :f_dt 
                || ''' and ''' || :l_dt || ''';
By
Vamsi
Previous Topic: literal does not match format string
Next Topic: How to disable Reports 6i Previewer (merged 4) windows xp
Goto Forum:
  


Current Time: Sat Nov 30 06:18:05 CST 2024