Re: "PLS-00382: expression is of wrong type" error
Date: 10 May 2002 00:18:32 -0700
Message-ID: <16584988.0205092318.61aef8ad_at_posting.google.com>
Hi,
A varchar2 variable in pl/sql can be up to 32,000+ bytes. I didn't quite understand your problem with values being longer than 4000 bytes.
Regards
Bhooshan
p_rogacki_at_hotmail.com (philr) wrote in message news:<b4810052.0205090817.2b5ec71d_at_posting.google.com>...
> I am trying to get data from a LONG column into something I can easily
> view. I tried pulling it into a varchar2, but ran into a problem with
> one of values being longer than 4000.
>
> So I'm trying to use a CLOB, and am not sure why the following isn't
> working:
> ====================================================
> declare
> cursor my_cursor is
> select my_col
> from my_tab1;
> my_var CLOB;
> begin
> open my_cursor;
> loop
> execute immediate 'fetch my_cursor into my_var';
> exit when my_cursor%notfound;
> insert into my_tab2 values (my_var);
> end loop;
> close my_cursor;
> end;
> /
> ====================================================
>
> my_tab2 has only one column, a CLOB.
>
> When I run the above I get the error in the "PLS-00382: expression is
> of wrong type" error for the "insert into my_tab2 values (my_var);"
> line.
>
> Any help is appreciated.
>
> Phil
Received on Fri May 10 2002 - 09:18:32 CEST