Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to convert LONG into LOB ????

RE: How to convert LONG into LOB ????

From: SAURY Alain <ASAURY_at_recherche.loreal.com>
Date: Tue, 17 Oct 2000 10:16:17 +0200
Message-Id: <10652.119426@fatcity.com>


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 be
ok, 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">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2651.75">
<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>
<BR><B><FONT SIZE=3D1 =
FACE=3D"Arial">De:&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 = FACE=3D"Arial">Helmut Daiminger [SMTP:hdaiminger_at_vivonet.com]</FONT> <BR><B><FONT SIZE=3D1 FACE=3D"Arial">Date:&nbsp;&nbsp;</FONT></B> <FONT = SIZE=3D1 FACE=3D"Arial">mardi 17 octobre 2000 02:05</FONT> <BR><B><FONT SIZE=3D1 =
FACE=3D"Arial">=C0:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> <FONT = SIZE=3D1 FACE=3D"Arial">Multiple recipients of list ORACLE-L</FONT> <BR><B><FONT SIZE=3D1 FACE=3D"Arial">Objet:&nbsp;</FONT></B> <FONT = SIZE=3D1 FACE=3D"Arial">How to convert LONG into LOB ????</FONT> </P>

<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&gt; desc TABLE1;</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Column = Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Null?&nbsp;&nbsp;&nbsp; = Type</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">------------------------------ =
-------- ----</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">EVENTICONID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = NOT NULL NUMBER(38)</FONT>
<BR><FONT SIZE=3D2 =
F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bsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; CHAR(2)</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">SQLWKS&gt; desc TABLE2;</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Column = Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Null?&nbsp;&nbsp;&nbsp; = Type</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">------------------------------ =
-------- ----</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">SQLID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; NOT NULL NUMBER(38)</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">SQLSCRIPT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
LONG</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">DOCUMENTID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
NUMBER(38)</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">DESCRIPTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VARCHAR2(50)</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; CHAR(2)</FONT>
</P>
<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" =

TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<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">&nbsp; INET: =
hdaiminger_at_vivonet.com</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Fat City Network = Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX: (858) = 538-5051</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">San Diego, = California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">---------------------------------------------------------=
-----------</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">To REMOVE yourself from this mailing = list, send an E-Mail message</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">to: ListGuru_at_fatcity.com (note EXACT = spelling of 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">the message BODY, include a line = containing: UNSUB ORACLE-L</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">(or the name of mailing list you want = Received on Tue Oct 17 2000 - 03:16:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US