Where-Clause with function(entered static parameter)
odabovalJun 15 2005 — edited Jun 20 2005Hello,
I have no clue on the way to deal with this issue.
Basically, for performance, I removed a join with a table, and replaced it by a call to a function within the where clause. This function only convert the entered date into an id, in order to compare with the id in the selected table.
I knew (I think I'm right!!) that if I put a function into a where-clause, then the function is called at each row.
As the parameter of this function is a Discoverer parameter, and therefore, it's a static value, I wanted to know whether with Discoverer, there would be a way to convert the entered Discoverer parameter value into a constant that I could use within my where-clause.
To summarise, hete is the face of my query, at the moment:
SELECT myColumns
FROM myTables
WHERE thisID < myConvertedDate(:RefDate);
I would like to do this :
The User enters the :RefDate, I convert it and save the result into a constant.
Then, my query would look like :
SELECT myColumns
FROM myTables
WHERE thisID < myConstantFromDate;
I hope that my explanation is clear, and that one of you will be able to advise me.
Thanks,
Olivier