Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can/how do I use a stored procedure on each record 1

Status
Not open for further replies.

staceyz

Programmer
Dec 6, 2000
4
US
Is it possible to call a stored procedure for every record?

I have an existing report that has a query with the order number and weight. I need to add criteria, and sometimes return 0 for the weight, based on if the order has already closed in another accounting period. I need to determine this by order number and date, so I was wondering if I could use a stored procedure, passing it the order number and the date range, and then returning the weight?

Also if this is possible, HOW would I do it?

Any help is appreciated...!Thanks.
 
You couldn't use a Stored Procedure, but you could use a stored function which returned the weight.

Create or replace function func_name (order_no varchar2, your_date date) returns number is
begin
......
return l_weight;
end;
/

then your query in your report would just have it in the select list...

select a.abc, b.def, func(a.order_no, b.you_date)
from...
....


HTH.
 
Thanks MikeJones!

I added a stored function, and accomplished the change I needed to and the report runs in the same amount of time [with a new index that was added too!]

Thanks for the help!
 
How do i access oracle stored procedure or package in Crystal report 8 version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top