|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Avoid common pitfalls of incorporating spreadsheets into Java apps. Read about it in the free white paper: “Five Biggest Blunders when Building Spreadsheet Applications in Java” Download Now! |
|
#1
|
|||
|
|||
|
guys i have the following cust search procedure, but it failed while compiling
any help would be appreciated. This procedure takes zipcode as input parameter & displays zip, cust name, & total sales for each cusomer; ************ create or replace procedure zipCust (v_zip IN Customer.zip%type v_zip OUT customer.zip%type; v_name OUT Customer.name%type; v_sum OUT Ord.Total%type; ) as cursor cur_cust (v_in_cur INcustomer.zip%type) is select zip, name, sum(total) INTO v_zip, v_name, v_sum FROM customer c, Ord o where c.custid =o.custid; group by zip, name; begin open cur_cust (v_zip); loop fetch cur_cust into v_zip, v_name, v_sum; exit when cur_cust%notfound; dbms_output.put_line ( ' customers in:'|| v_zip || v_name || v_sum ); end loop; end; |
|
#2
|
|||
|
|||
|
cursor cur_cust (v_in_cur INcustomer.zip%type) is
select zip, name, sum(total) INTO v_zip, v_name, v_sum FROM customer c, Ord o where c.custid =o.custid; group by zip, name; In this code do not use into clause Instead,use following code for cursor: cursor cur_cust (v_in_cur INcustomer.zip%type) is select zip, name, sum(total) FROM customer c, Ord o where c.custid =o.custid; group by zip, name; Jigar |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > pl/sql procedure help--getting error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|