user3114689
user3114689

Reputation: 3

plsql stored procedure taking parameter gives error

I tried to create a procedure in pl/sql developer like,

create or replace procedure insert_muh_fis(birim_id in number(15)) is   
begin
     insert into muh_Fis_d013
     select * from muh_fis mf where mf.fk_birim_id = birim_id;
     --delete from muh_fis mf where mf.fk_birim_id = birim_id;
     --commit;
end;

But it gives me Compilation error.

Error: PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % öndeğer karakterThe symbol ":=" was substituted for "(" to continue.
Line: 1

I would appreciate any idea to help me out solve this problem. Thank you very much.

Upvotes: 0

Views: 185

Answers (1)

Dba
Dba

Reputation: 6639

You don't need to specify the datatype precision in IN parameter, your parameter declaration should be like birim_id IN NUMBER.

Try,

CREATE OR REPLACE 
PROCEDURE insert_muh_fis(birim_id IN NUMBER) 
IS
BEGIN
     INSERT INTO muh_fis_d013
     SELECT * FROM muh_fis mf WHERE mf.fk_birim_id = birim_id;
     --delete from muh_fis mf where mf.fk_birim_id = birim_id;
     --commit;
END;

Upvotes: 1

Related Questions