Error in Parameters of Stored Procedure when Dynamic SQL is used -
i using oracle sql developer write stored proc, accepts list of values separated "," (dynamic sql) , use variable in "in" clause fire query table.
but ending error @
@p_case_nbr varchar2(100),
error(4,5): pls-00103: encountered symbol "@" when expecting 1 of following: current delete exists prior
the sp used:
create or replace procedure test_proc ( @p_case_nbr varchar2(100), p_out_case_nbr out varchar2 ) cursor test_cur select t.column1 test_table t t.column1 in (@p_case_nbr); test_cur_line test_cur%rowtype; begin p_out_case_nbr := null; open test_cur; loop fetch test_cur test_cur_line; exit when test_cur%notfound; p_out_case_nbr := p_out_case_nbr || ' ' || test_cur_line.column1; dbms_output.put_line(test_cur_line.column1); end loop; close test_cur; dbms_output.put_line('final value ' || p_out_case_nbr); dbms_output.put_line('sp completed succesfully'); end;
in oracle
no need of giving @
before varibles try remove @
@p_case_nbr
ever specified , try once again , no need of specifying size of parameter @p_case_nbr varchar2(100)
give @p_case_nbr varchar
Comments
Post a Comment