Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convert long to varchar

654808Sep 18 2008 — edited Sep 18 2008
Hi all. Why am I getting this error? :_|

create or replace function mike.getHighValue(
p_owner varchar2,
p_table varchar2,
p_part_name varchar2
) return varchar2 as

l_data long;

begin
select high_value into l_data from dba_tab_partitions
where table_owner = p_owner
and table_name=p_table
and partition_name=p_part_name;
return substr( l_data, 1, 4000 );
end;

------

select mike.getHighValue( high_value) from dba_tab_partitions;


ORA-00997: illegal use of LONG datatype
This post has been answered by Pradeep Dewani on Sep 18 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2008
Added on Sep 18 2008
8 comments
411 views