Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to convert LONG into LOB ????
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C03812.85C57150
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Starting with 8.1.5 you can use the TO_LOB function that converts a =
LONG RAW
to a LOB.
However it has limitations : it think it can only be used within a =
INSERT
SELECT command.
Alain
-----Message d'origine----- De: Helmut Daiminger [SMTP:hdaiminger_at_vivonet.com] Date: mardi 17 octobre 2000 02:05 =C0: Multiple recipients of list ORACLE-L Objet: How to convert LONG into LOB ???? Hi! I got two tables that have LONG and LONG RAW datatypes in them. a) since we are running 8i, it would make sense to convert them to LOB columns, eh? Since we store pictures in those columns, BLOB would beok, eh?
b) how do I move existing data from the original table to the new table
(with LOB column)?
This is 8.1.6 on Win2k.
Thanks, Helmut SQLWKS> desc TABLE1; Column Name Null? Type ------------------------------ -------- ---- EVENTICONID NOT NULL NUMBER(38) DESCRIPTION VARCHAR2(50) USERID NUMBER(38) ICON LONG RAW DOCUMENTID NUMBER(38) STATUS CHAR(2) SQLWKS> desc TABLE2; Column Name Null? Type ------------------------------ -------- ---- SQLID NOT NULL NUMBER(38) SQLSCRIPT LONG DOCUMENTID NUMBER(38) DESCRIPTION VARCHAR2(50) STATUS CHAR(2) --=20 Please see the official ORACLE-L FAQ: http://www.orafaq.com --=20 Author: Helmut Daiminger INET: hdaiminger_at_vivonet.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).
------_=_NextPart_001_01C03812.85C57150
Content-Type: text/html;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =charset=3Diso-8859-1">
<TITLE>RE: How to convert LONG into LOB ????</TITLE> </HEAD> <BODY>
<P><FONT SIZE=3D2 FACE=3D"Arial">Starting with 8.1.5 you can use the = TO_LOB function that converts a LONG RAW to a LOB.</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">However it has limitations=A0: it = think it can only be used within a INSERT SELECT command.</FONT> </P>
<P><B><I><U><FONT COLOR=3D"#0000FF" SIZE=3D1 = FACE=3D"Arial">Alain</FONT></U></I></B>
</P> <UL> <P><A NAME=3D"_MailData"><FONT SIZE=3D1 FACE=3D"Arial">-----Message =d'origine-----</FONT></A>
<P><FONT SIZE=3D2 FACE=3D"Arial">Hi!</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I got two tables that have LONG and =
LONG RAW datatypes in them.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">a) since we are running 8i, it would = make sense to convert them to LOB</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">columns, eh? Since we store pictures = in those columns, BLOB would be ok, eh?</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">b) how do I move existing data from = the original table to the new table</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">(with LOB column)?</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">This is 8.1.6 on Win2k.</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Helmut</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">SQLWKS> desc TABLE1;</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Column = Name &n= bsp; Null? = Type</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">------------------------------ =-------- ----</FONT>
FACE=3D"Arial">DESCRIPTION &nbs= p; &nbs= p; VARCHAR2(50)</FONT><BR><FONT SIZE=3D2 =
FACE=3D"Arial">USERID &nb= sp; &nb= sp; &nb=sp; NUMBER(38)</FONT>
FACE=3D"Arial">ICON  = ;  = ;  =; LONG RAW</FONT>
FACE=3D"Arial">DOCUMENTID  = ;  = ; =NUMBER(38)</FONT>
FACE=3D"Arial">STATUS &nb= sp; &nb= sp; &nb=sp; CHAR(2)</FONT>
</P> <BR> <BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">SQLWKS> desc TABLE2;</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Column = Name &n= bsp; Null? = Type</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">------------------------------ =-------- ----</FONT>
FACE=3D"Arial">SQLID &nbs= p; &nbs= p; NOT NULL NUMBER(38)</FONT><BR><FONT SIZE=3D2 =
FACE=3D"Arial">SQLSCRIPT = = =LONG</FONT>
FACE=3D"Arial">DOCUMENTID  = ;  = ; =NUMBER(38)</FONT>
FACE=3D"Arial">DESCRIPTION &nbs= p; &nbs= p; VARCHAR2(50)</FONT><BR><FONT SIZE=3D2 =
FACE=3D"Arial">STATUS &nb= sp; &nb= sp; &nb=sp; CHAR(2)</FONT>
<P><FONT SIZE=3D2 FACE=3D"Arial">-- </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Please see the official ORACLE-L FAQ: = <A HREF=3D"http://www.orafaq.com" =
<BR><FONT SIZE=3D2 FACE=3D"Arial">-- </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Author: Helmut Daiminger</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> INET: =hdaiminger_at_vivonet.com</FONT>
<P><FONT SIZE=3D2 FACE=3D"Arial">Fat City Network =
Services -- (858) 538-5051 FAX: (858) =
538-5051</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">San Diego, =
California -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------=-----------</FONT>
![]() |
![]() |