Re: Copy Blob data into Varchar2
Date: Thu, 26 Mar 2020 10:59:39 +0000
Message-ID: <LNXP265MB1562E37BD36B43A6CB89EF68A5CF0_at_LNXP265MB1562.GBRP265.PROD.OUTLOOK.COM>
Someone needs to tell the third party application supplier that it's a bad idea to store character data in a BLOB. If they store it in a CLOB then it will translated into a two-byte fixed characterset so that the person who inserts the data and the person who queries the data could use different character sets and still see the correct data (Oracle will translate both ways between the two-byte fixed and whatever client character set is in use).
If they store the characters as a BLOB then Oracle doesn't do any translation- after all, it's not "character" data, it's raw data - so the person reading the data may find that they see garbage because they're trying to read the data using a different encoding than that used by the original writer.
Regards
Jonathan Lewis
From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Sanjay Mishra <dmarc-noreply_at_freelists.org> Sent: 26 March 2020 00:54
To: oracle-l_at_freelists.org; Mladen Gogala Subject: Re: Copy Blob data into Varchar2
Mladen
On 3/24/20 11:14 PM, Sanjay Mishra (Redacted sender smishra_97 for DMARC) wrote: Can someone share any function which can allow to insert BLOB data into Varchar2 column? Most of the BLOB data is less than 32K but selecting the BLOB using dbms_lob.substr( l_cur.mylob, 32000, 1 ) or utl_raw.cast_to_varchar2 gave error
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Can someone share an example to convert data from BLOB to varchar ?
Tx
Sanjay
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 26 2020 - 11:59:39 CET