Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Long To Varchar2
In my opinion it can only done by using dbms_sql. Example (not tested, not compiled!):
create or replace function my_function (v_id in number, v_size in integer)
return varchar2
is
-- v_size = number of characters to retrieve
v_cur integer; v_rc integer; v_buffer varchar2(4000); v_buf_len integer;
"Ray" <ray.dowling_at_portbris.com.au> schrieb im Newsbeitrag
news:pVpk6.2372$v4.100832_at_ozemail.com.au...
> Creating a data warehouse using data extraction - Oracle d/b to Oracle
d/b.
> Some data is in a table is in Long datatype - need to extract and insert
in
> varchar2 column.
>
> Would like to use one select statement eg
>
> Insert into xxxx (varchar_data, ...
> Select substr(long_data,1,100) from xxxx => get error
>
> Any thoughts on creating a function convert long to varchar2 (input
> long_data output varchar2??
>
>
>
>
Received on Wed Feb 21 2001 - 15:27:09 CST
![]() |
![]() |