|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
procedure
I have to make a procedure to change a given customer's address. I am having difficulty getting it to compile. Can anyone help? Thanks
set serveroutput on DECLARE change boolean; PROCEDURE change_customer_address (customer_id IN customer.cust_id%TYPE, address_change OUT boolean) IS current_address customer.status%TYPE; BEGIN SELECT address INTO current_address FROM customer WHERE cust_id = customer_id; |
|
#2
|
|||
|
|||
|
Hi,
Don't quite understand what you are trying to do - if to change the address in the db you may want to use update and not select in that case this should work: create or replace procedure(a_id number, new_address varchar2) is begin update <table_name > set address=new_address where id=a_id; exception when others then null; end; if you wish to extract the address in the database replace the update with a select + into clause and the new_address should be out. |
|
#3
|
|||
|
|||
|
Still have problems
i tried this but i get the following error: create or replace procedure(a_cust_id varchar2, new_address varchar2)
* ERROR at line 1: ORA-04050: invalid or missing procedure, function, or package name create or replace procedure(a_cust_id varchar2, new_address varchar2) is begin update customer set address=new_address where id= a_cust_id; exception when others then null; end; |
|
#4
|
|||
|
|||
|
Sorry - my mistake :
Create or replace procedure aaa (... i omited the name of the procedure. Galit. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|