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

Home -> Community -> Usenet -> c.d.o.misc -> LONG RAW to BLOB conversion

LONG RAW to BLOB conversion

From: Dave North <dnorth_at_baynetworks.com>
Date: Fri, 12 Feb 1999 16:27:56 -0500
Message-ID: <7a26f9$ldl$1@paperboy.baynetworks.com>


Hello,

    We have a table with a long raw currently in it that we'd like to convert to a blob. I know the long raw is less than 32k so I'm hoping to just add a new column to the table, select the long into a raw and then use write to dump it into the blob. Funny thing is, the code doesn't complile..gives me a numeric error on the write. Here's what I'm trying to do:

DECLARE
    lob_loc BLOB;
    buffer RAW(32000);
    amt BINARY_INTEGER := 32000;
    pos INTEGER := 1;
BEGIN
/* this works fine */

    select preferences into buffer
    from table A
    where user_key='admin';

/* get the BLOB locator */

    select temp_blob into lob_loc
    from Table B
    where user_key='admin';

/* ack..numeric error here...*/

     DBMS_LOB.WRITE(lob_loc, amt, pos, buffer);

END;
/

I think the theory is sound but I must be missing something here. ANy ideas?

Cheers

Dave

dnorth_at_baynetworks.com Received on Fri Feb 12 1999 - 15:27:56 CST

Original text of this message

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