Link to home
Start Free TrialLog in
Avatar of dbdp
dbdp

asked on

Multiple paramaters for store procedure in crystal

I have a stored procedure in Oracle that I wish to use for a query in Crystal Reports for visual Studio.

The procedure is as follows - that works fine for dates.  

Dow, If I wanted to create a parameter for, say, StyleNo, however the styleNo could have multiple paramaters OR be null, i.e. Parameter optional in Crystal, how could I go about doing that?

Thanks a million

create or replace procedure pr_TopMerchSales(DateFrom IN Date, DateTo IN Date, prc out sys_refcursor)
is
begin
  open prc for
  select  Dept
      , DIV
      , StyleDesc
      , StyleNo
      , vendor
      , Round((select sum(V.qty) from V_TOP_MERCH_SALES V where V.vendor = I.vendor and I.Dept = V.DEPT and I.DIV = V.DIV and I.StyleNo = V.StyleNo and V.CREATED_DATE >= trunc(DateFrom) and V.CREATED_DATE <= trunc(DateTo)),2) as QtySold
     
from CMS.INVENTORY_V I
where I.ACTIVE = 1
group by DIV , Dept, StyleDesc,StyleNo, I.Vendor

end;
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial