Accessing LONG RAW data information

Hi,
Can anybody help me in knowing the information stored into a LONG RAW column. I would appreciate it in either SQL / PL SQL.
Thanks in advance.
Anil.

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Anil Budhkar ([email protected]):
Hi,
Can anybody help me in knowing the information stored into a LONG RAW column. I would appreciate it in either SQL / PL SQL.
Thanks in advance.
Anil.<HR></BLOCKQUOTE>
well you have DBMS_LOB functions. Tou can visit the website for documentation and try using them. But what type of data is it.
null

Similar Messages

  • Issue with Oracle LONG RAW data type

    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /

    Maddy wrote:
    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /below might work
    12:06:23 SQL> help copy
    COPY
    Copies data from a query to a table in the same or another
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                {APPEND|CREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[/password]@connect_identifier

  • Import/Export of LONG RAW data to/from Oracle 7.3.3

    Is it possible to export the table with LONG RAW data from one instance and then import the dump file to another instance? Does Oracle 7.3.3 support these, if yes, how can I verify the LONG RAW data is successfully imported? If possible, please also provide me with some sample codes. Thanks a lot.

    NO you do not have to run catexp7, export files are UPWARD compatable. 10G import can read a 7 export (however 7 export could NOT understand a 10g export.)

  • [ORACLE 10G] Extract Long Raw data to disc

    Hi All,
    I want to extract a column which contain long raw data (pdf file) into files on my disque, but i don't know how to do it in SQL or PL/SQL, any help ???

    Or maybe just an alter table statement will do it for you...
    SQL> create table xx (x long raw);
    Table created.
    SQL> desc xx;
    Name                                                                   Null?    Type
    X                                                                               LONG RAW
    SQL> alter table xx modify (x blob);
    Table altered.
    SQL> desc xx;
    Name                                                                   Null?    Type
    X                                                                               BLOB
    SQL>I've not really used LONG RAW's before but apparently (according to sources on the net) the simlple alter table statement above will do the job.

  • Select Long Raw data type is so slow?

    Hi
    I have a table having Long Raw data type field.It's store
    more than 2mb per record.But,I need to select others fields in this table without selecting Long Raw field.
    anyway,it's so slow for me. Any advise to me?
    thx a lot. :)

    I do not understand what you mean because if you have this table ( Example ):
    c1 number
    c2 number
    c3 long
    you can do this: select c1, c2 from <table_name>;
    Joel Pérez

  • Re:read  long raw  data in Oracle  and write to a file

    So we need an mechanism to read data from LONG RAW and convert into actual file.
    Regards

    I've branched your post off from the thread you posted on ({thread:id=620757}) as it was an old thread.
    When you have a question of your own, you should always start a new thread rather than tag onto old ones.
    Please read: {message:id=9360002} and post some relevant information so that people can help you.

  • How to read LONG RAW data from one  table and insert into another table

    Hello EVERYBODY
    I have a table called sound with the following attributes. in the music attribute i have stored some messages in the different language like hindi, english etc. i want to concatinate all hindi messages and store in the another table with only one attribute of type LONG RAW.and this attribute is attached with the sound item.
    when i click the play button of sound item the all the messages recorded in hindi will play one by one automatically. for that i'm doing the following.
    i have written the following when button pressed trigger which will concatinate all the messages of any selected language from the sound table, and store in another table called temp.
    and then sound will be played from the temp table.
    declare
         tmp sound.music%type;
         temp1 sound.music%type;
         item_id ITEM;
    cursor c1
    is select music
    from sound
    where lang=:LIST10;
    begin
         open c1;
         loop
              fetch c1 into tmp; //THIS LINE GENERATES THE ERROR
              temp1:=temp1||tmp;
              exit when c1%notfound;
         end loop;
    CLOSE C1;
    insert into temp values(temp1);
    item_id:=Find_Item('Music');
    go_item('music');
    play_sound(item_id);
    end;
    but when i'm clicking the button it generates the following error.
    WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXCEPTION ORA-06502.
    ORA-06502: PL/SQL: numeric or value error
    SQL> desc sound;
    Name Null? Type
    SL_NO NUMBER(2)
    MUSIC LONG RAW
    LANG CHAR(10)
    IF MY PROCESS TO SOLVE THE ABOVE PROBLEM IS OK THEN PLESE TELL ME THE SOLUTION FOR THE ERROR. OTHER WISE PLEASE SUGGEST ME,IF ANY OTHER WAY IS THERE TO SOLVE THE ABOVE PROBLEM.
    THANKS IN ADVANCE.
    D. Prasad

    You can achieve this in many different ways, one is
    1. Create another VO based on the EO which is based on the dest table.
    2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
    3. commiting the transaction will push the data into the dest table on which the dest VO is based.
    I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
    if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
    Tapash

  • Importing a file containing long raw data

    I have got a .dmp file which was exported from an oracle 8i database & contains a long raw column.Now, when i try to import this file in to oracle 9i database, the import says,
    C:\>imp
    Import: Release 9.2.0.1.0 - Production on Sat Aug 20 14:51:03 2005
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Username: sys@mydb2 as sysdba
    Password:
    Connected to: Personal Oracle9i Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Import file: EXPDAT.DMP > invoice_content.dmp
    Enter insert buffer size (minimum is 8192) 30720>
    Export file created by EXPORT:V08.01.07 via conventional path
    Warning: the objects were exported by TPSYSADM, not by you
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    export client uses US7ASCII character set (possible charset conversion)
    export server uses US7ASCII NCHAR character set (possible ncharset conversion)
    List contents of import file only (yes/no): no >
    Ignore create error due to object existence (yes/no): no >
    Import grants (yes/no): yes >
    Import table data (yes/no): yes >
    Import entire export file (yes/no): no >
    Username: tpsysadm
    Enter table(T) or partition(T:P) names. Null list means all tables for user
    Enter table(T) or partition(T:P) name or . if done:
    . importing TPSYSADM's objects into SYS
    Import terminated successfully without warnings.
    Now, when i query from the sys user, i dont find any object with the name invoice_contents.
    Can any 1 help me out of the above problem.
    Thanks in advance.

    The import seems OK, but it also seems that no rows have been imported, maybe no tables. What is the result of :
    SQL> select owner, table_name from dba_tables where table_name like '%INVOICE%';
    BTW, is the name invoice_content or invoice_contents ?
    If the query does not give result, then try to check the content of your dmp file
    C:\> imp user/password@db file=invoice_content.dmp full=y show=y
    Paul

  • LONG RAW Data Column

    Hi everybody,
    I have this table:
    CREATE TABLE ATTACHMENTS
        AREFITEM  NUMBER NOT NULL,
        ATTACHMENT LONG RAW ,
        CONSTRAINT ATTACHMENTS_PK PRIMARY KEY ( AREFITEM ) ENABLE
      );This sequence:
    CREATE SEQUENCE SATTACHMENTS INCREMENT BY 1 MAXVALUE 999999999999999999999999999 MINVALUE 1 CACHE 20;I have some data in the table... i will not show because it would looks awful posted in here (something like 53454C4543542..... in the ATTACHMENT column) :P
    How can i duplicate the data?
    INSERT INTO ATTACHMENTS(AREFITEM  , ATTACHMENT ) SELECT SATTACHMENTS.NEXTVAL, ATTACHMENT from ATTACHMENTS WHERE AREFITEM = 1;Gives me an error of : illegal use of LONG datatype.
    Is this even possible?
    1. I cannot unfortunately change to BLOB.
    2. Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    Corrected.
    Edited by: Vitor Rodrigues on 26/Mar/2012 14:57

    Hi,
    It seems like you've forgotten the from clause in the select statement :
    INSERT INTO ATTACHMENTS(AREFITEM  , ATTACHMENT ) SELECT SATTACHMENTS.NEXTVAL, ATTACHMENT WHERE AREFITEM = 1;

  • Slow performance with long raw data

    Hi all,
    we are running a 8i on linux (suse 6.2). everything is fine, but
    when we try to select data from a table with two number and one
    long raw fields the performance is real low.
    data were exported from a 7.0.3 server running on a solaris box.
    the new server is much more performant then the sun box, only
    this one table doesnt work correct.
    Any ideas what i did wrong? more details could be supplied if
    needed.
    Li
    null

    Caitanya wrote:
    Blushadow,
    I thought this is how a Cursor loop works:
    ..cut..
    you need not fetch it again inside the loop? you fetch it once and the loop takes care of implicitly fetching one record at a time in the cursor.
    Please correct me if I am wrong.Yes, typically a cursor loop starts the loop, then fetches and then tests for exit condition before processing.
    The style the OP is using comes from the old BASIC style where we had REPEAT..UNTIL loops. The condition for these loops, due to their syntax, was specified on the UNTIL part e.g.
    REPEAT
      .. code ..
    UNTIL <condition>;This meant that the code would always be executed once and therefore, to prevent the code executing unecessarily you would have to code something like... (excuse my pseudo code)
    IF <condition> = TRUE THEN
      REPEAT
        .. code ..
      UNTIL <condition>
    END IF;So, in terms of what the OP is doing, they are fetching the first row outside the loop, using the condional check as the first thing inside the loop to prevent execution of the code if it's unnecessary, and then at the end of the loop fetching the next row before looping back around to the conditional check. Typically, you wouldn't do it that way, but it's fine and does work.

  • Does oracle 8i can be able to export and import long raw data?

    Hi freinds,
    i m trying to export a user schema that includes emp_photo a long raw, it got exported with out errors (oracle 7 doesnt). when im tryuing to import it is getting failed, does it cant be imported? or this is becz of some other problems.
    thanks in advance

    Hi,
    Could you list the error messages that you are getting when you try to do an import.

  • Sending Long Raw Data to Oracle database through Stored  Procedure

    Hi,
    I am trying to push data to Oracle 9i database through Stored Procedure via thin driver. It is going smoothly upto 29411 bytes. But it is not accepting for 53843 bytes and giving following error :
    java.sql.SQLException: Data size bigger than max size for this type: 53843
    Is it thin driver limitation? Can I solve it by using OCI driver? Or is there any other approach?
    I tried creating connection pool in weblogic 7.0 through OCI driver. But I am not able to configure it. Is there any special way of configuration.
    Quick response will be greatly appreciated.
    Thanks
    Sanjiv

    It happens to me. But I am using CMP of Weblogic 7. If you write your own jdbc code, the following link may be helpful.
    http://otn.oracle.com/sample_code/tech/java/codesnippet/xmldb/HowToLoadLargeXML.html

  • Copying Long Raw Column Data to another table

    hi everyone,
    i am trying to Copy Long Raw Column Data to another table in the same schema. this is the situation
    Table A (col1 number,col2 long raw) with 100 records
    Table B (col1 number,col2 long raw) with 0 records
    now i want to copy col2 of the table A into the column 2 of the table B. but long raw data cant be retrieved in a select statement so is there any specific procedure that will copy long raw data or there is any simple way.
    i will be really grateful for anybody's help.
    thanx
    shakeel

    Dust off that old SQL*PLUS command "COPY" ...
    create table tablea (col1 number,col2 long raw)
    insert into tablea values (1, testrawio.chartoraw('this is line one'));
    insert into tablea values (2, testrawio.chartoraw('this is line two'));
    insert into tablea values (3, testrawio.chartoraw('this is line three'));
    create table tableb (col1 number,col2 long raw)
    copy from scott/tiger@larry insert tableb (col1, col2) using select col1, col2 from tablea
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
       3 rows selected from scott@tiger.
       3 rows inserted into TABLEB.
       3 rows committed into TABLEB at DEFAULT HOST connection.
    SQL>Now to prove it has worked :
    begin
       for lr in (select col1, col2 from tableb)
       loop
          dbms_output.put_line('col1 = '||lr.col1||
                               ' and col2 contains long raw equivalent of '||testrawio.rawtochar(lr.col2));
       end loop;
    end;
    col1 = 1 and col2 contains long raw equivalent of this is line one
    col1 = 2 and col2 contains long raw equivalent of this is line two
    col1 = 3 and col2 contains long raw equivalent of this is line three
    PL/SQL procedure successfully completed.
    SQL> Note : In order to load some test data and prove the method works I made use of a package called "testrawio" located at http://www.classicity.com/oracle/htdocs/forums/ClsyForumID125/7.html
    AMM

  • Updating and inserting on Long Raw column

    Hi All,
    My source table contains LONG RAW column in XX databse. I have to fetch the data from this table in YY Databse using DB link and insert into same structured table. The problem is, i can not access the LONG RAW data for some rows which the size exceeding above 32k.
    My requirement is, i have to fetch and insert or update the record(Source and target table structure is same and dtabase is different).
    Please suggest the best way of handle this problem.
    Please let me know if you need more information.
    Thanks
    Ram
    Edited by: ram on Oct 19, 2008 2:11 PM
    Edited by: ram on Oct 19, 2008 2:12 PM

    We using the procedure to insert and update. Procedure will called to update or insert only one record at a time from XX databse to YY database.
    We are not using SQL * PLUS for this operation.
    Thanks
    Ram

  • How to transfer long raw between servers

    There is a view in remote server that has included long raw field in which images are stored in tiff format.
    I want to transfer them to a local server. When I searched I found out that one way to do such transfer is copy command in sqlplus.
    When I used this command to transmit the data, long raw field has failed. Given that I can not give a dump, what way I can choose to transfer long raw data.

    Difficult to say if you keep information about your Oracle version secret.

Maybe you are looking for