plsql - Simple Procedure raise ORA-06502 -
there's simplified version of code keep raise me ora-06502:
declare          p_filter     varchar2(300) := '2012';     p_value      varchar2(300) := '12345.000';      w_new_value  number(13,3)  := null ;     w_count      number(4)     := null ;    begin     select count(*)        w_count       dual       p_filter = p_filter;       --- more filters     if w_count != 0       w_new_value := p_value / w_count;    else       w_new_value := p_value;    end if;            --  end; /   someone can give me help?
database details
- nls_language = italian
 - nls_territory = italy
 - nls_currency = �
 - nls_iso_currency = italy
 - nls_numeric_characters = ,.
 - nls_calendar = gregorian
 - nls_date_format = dd-mon-rr
 - nls_date_language = italian
 - nls_characterset = we8iso8859p15
 - nls_sort = west_european
 - nls_time_format = hh24:mi:ssxff
 - nls_timestamp_format = dd-mon-rr hh24:mi:ssxff
 - nls_time_tz_format = hh24:mi:ssxff tzr
 - nls_timestamp_tz_format = dd-mon-rr hh24:mi:ssxff tzr
 - nls_dual_currency = �
 - nls_nchar_characterset = al16utf16
 - nls_comp = binary
 - nls_length_semantics = byte
 - nls_nchar_conv_excp = false
 
first, always going return value of 1.
select count(*)        w_count       dual   it doesn't matter qualifier is.
lastly, ran simplified code example in oracle 11r2 , didn't throw exception.
i added following statement in place of "do something" comment:
dbms_output.put_line('w_new_value: ' || w_new_value || '. w_count: ' || w_count);   the result was:
w_new_value: 12345. w_count: 1   so, think you've simplified example oblivion. need provide shows error.
good luck.
Comments
Post a Comment