Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: help : about long datatype
In article <99p9o8$qv8$1_at_charm.magnus.acs.ohio-state.edu>, C.K.
<cklok2000_at_sinaman.com> writes:
>i'm looking for solution for this asap
>i'm trying to make a trigger which will send some records to table B
>after/before insert to table A
> however, one of the field of table A must be a "LONG" datatype, while that
>field in table B must be a "VARCHAR2" datatype for some reason.
> can you help me out of how to convert it or whatever way i can archieve
>that goal?
> i will appreicate it
>
Well a varchar2 in pl/sql can hold up to 32K so as long as the actual data in
the long column is <= to 32K you can select the long into the pl/sql variable
then substring the pl/sql variable into the table B varchar2 column. But if
your table A long column contains more than 4000 bytes of information you are
losing data.
You should consider converting the long column into a LOB.
![]() |
![]() |