I have two functions that will return the most recent date and most recent price respevtively. The query that calls these functions used to be a group by on the unique ID for the function. So the functions were only called once per unique ID.
The query has had to change to a detail query and calling the functions once per detail row has some huge overhead. What I would like to do is have global variables in the function to save the Unique ID, most recent date, and most recent price. If the Unique ID changes, I do the lookup and return the value and save it into the global value so on the next record when the unique ID is the same, I can simply return the saved date and price.
The query is sorted by Unique ID.
Anybody know of a way to do this?
Thanks in advance,
Jerry
Jerry Scannell
The query has had to change to a detail query and calling the functions once per detail row has some huge overhead. What I would like to do is have global variables in the function to save the Unique ID, most recent date, and most recent price. If the Unique ID changes, I do the lookup and return the value and save it into the global value so on the next record when the unique ID is the same, I can simply return the saved date and price.
The query is sorted by Unique ID.
Anybody know of a way to do this?
Thanks in advance,
Jerry
Jerry Scannell