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: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
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: Sun Dec 04 08:31:40 CST 2016

Total time taken to generate the page: 0.09493 seconds