How get full data from table [message #292965] |
Thu, 10 January 2008 05:34 |
bornlooser
Messages: 20 Registered: September 2005 Location: Jakarta
|
Junior Member |
|
|
Hi All,
Table fnd_user has column end_date that have some null and rest not-null values.
I m using this query in report and passing optional parameter for end_date. In case parameter is null, it shd show all rows from table, including rows where end_date is null.
select * from fnd_user where end_date = nvl(parameter,end_date);
Problem is that we can't format data of coulmn on left side of equal-to operator as we gets problem in getting this column based index in execution plan and query gets slow.
can't use like this...
select * from fnd_user where nvl(end_date,sysdate) = nvl(parameter,nvl(end_date,sysdate));
plz advise something else...
thanks a lot
|
|
|
|
|
|
|
|
|