RE: convert long raw to varchar2

2002-09-01 Thread Khedr, Waleed

Am I missing something? this works for me:

create table testlong (c1 number,c2 long raw);

insert into testlong values (10,'0123456789abcdef');

declare
 m_c1 number;
 m_c2 varchar2(2000);
begin
 select * into m_c1,m_c2 from testlong;
 dbms_output.put_line(m_c2);
end;

-Original Message-
Sent: Sunday, September 01, 2002 3:48 PM
To: Multiple recipients of list ORACLE-L


Dear List,

 This is what I'm trying to do in a stored procedure.
1) Read a long raw column from a table into a varchar2 variable. (Let's
 assume that each value contains a not-too-long text value.)
 2) Parse it to create a bunch of insert statements and execute them.

 Step 2 is something I understand how to do.  But, I've no clue how to do
 step 1.  I've spent a few hours trying to figure out the tools I need for
 this.  All my research turns up information on how to convert long raw to
 blob/clob etc. and the advantages of blob/clob over long raw and so on.
My impression is that dealing with long raw is considered so basic that
people  don't even mention it :-)

 I'd appreciate any pointers.

 Thanks for your time,
- Rao
> 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: sun449
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Khedr, Waleed
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).



Re: convert long raw to varchar2

2002-09-01 Thread Mladen Gogala

You convert LONG to CLOB and then read it into your character variable using 
DBMS_LOB.READ.
Alternatively, you can use Java and/or EXTPROC.



On 2002.09.01 15:48 sun449 wrote:
> Dear List,
> 
>  This is what I'm trying to do in a stored procedure.
> 1) Read a long raw column from a table into a varchar2 variable. (Let's
>  assume that each value contains a not-too-long text value.)
>  2) Parse it to create a bunch of insert statements and execute them.
> 
>  Step 2 is something I understand how to do.  But, I've no clue how to do
>  step 1.  I've spent a few hours trying to figure out the tools I need for
>  this.  All my research turns up information on how to convert long raw to
>  blob/clob etc. and the advantages of blob/clob over long raw and so on.
> My impression is that dealing with long raw is considered so basic that
> people  don't even mention it :-)
> 
>  I'd appreciate any pointers.
> 
>  Thanks for your time,
> - Rao
> > 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: sun449
>   INET: [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED] (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).
> 

-- 
Mladen Gogala
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mladen Gogala
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).



convert long raw to varchar2

2002-09-01 Thread sun449

Dear List,

 This is what I'm trying to do in a stored procedure.
1) Read a long raw column from a table into a varchar2 variable. (Let's
 assume that each value contains a not-too-long text value.)
 2) Parse it to create a bunch of insert statements and execute them.

 Step 2 is something I understand how to do.  But, I've no clue how to do
 step 1.  I've spent a few hours trying to figure out the tools I need for
 this.  All my research turns up information on how to convert long raw to
 blob/clob etc. and the advantages of blob/clob over long raw and so on.
My impression is that dealing with long raw is considered so basic that
people  don't even mention it :-)

 I'd appreciate any pointers.

 Thanks for your time,
- Rao
> 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: sun449
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).