Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: changing long to lob
In 8i you can use ... (straight from SQL reference manual)
TO_LOB
Purpose Converts LONG or LONG RAW values in the column long_column to LOB
values. You can apply this function only to a LONG or LONG RAW column, and
only in the SELECT list of a subquery in an INSERT statement (see "INSERT"
on page 7-512).
Before using this function, you must create a LOB column to receive the
converted LONG values. To convert LONGs, the LOB column must be of type CLOB
or NCLOB. To convert LONG RAWs, the LOB column must be of type BLOB.
TO_LOB ( long_column )
Example Given the following tables:
CREATE TABLE long_table (n NUMBER, long_col LONG); CREATE TABLE lob_table (n NUMBER, lob_col CLOB);
use this function to convert LONG to LOB values as follows:
INSERT INTO lob_table
SELECT n, TO_LOB(long_col) FROM long_table;
HTH
Raj
QOTD: Any clod can have facts, but having an opinion is an art !
*********************************************************************2
This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.
*********************************************************************2
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Jamadagni, Rajendra
INET: Rajendra.Jamadagni_at_espn.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Aug 21 2001 - 08:17:07 CDT
![]() |
![]() |