Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Stored Procedures
Hello,
I am working on a report that uses a database function: fn_variance(). This function accepts a starting and ending date to calculate a lost production variance value. The problem is that in Powerbuilder I need to create a graph that will do this *by day*.
Instead of coding a loop, I would like to make a stored procedure that: "Accepts a starting and ending date, and creates a result set of all the days starting from the start date and ending on the end date." This would allow me to hopefully do something like:
select fn_variance (sp_startdate, sp_enddate) from sp_daysbetween (:ra_start, :ra_end) where sp_startdate <= ra_end;
Where sp_??? are the temporary "rows" of my resultset and ra_??? are retrieval arguments.
I know how to create stored functions and use them, and how to use explicit cursors, but my question is how do I specify this stored procedure is creating a result set and how do I build it?
reply to: chrislambert_at_pobox.com
TIA!
Chris
Received on Wed May 06 1998 - 18:04:13 CDT
![]() |
![]() |