Long Raw to Text Format in Oracle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ritu1
    New Member
    • Aug 2007
    • 1

    Long Raw to Text Format in Oracle

    Hi,

    I have an Oracle table with a column of long raw datatype. I want to see the data in this column so I can manipulate it. Can you please advice on some function/procedure to convert this to readable format?

    SQL> desc EDI_DATA
    Name Null? Type
    -------------------------- ----- -------------
    RELEASE_CHAR VARCHAR2(2)
    EDI_DOC LONG RAW

    Thanks,
    Ritu
    Last edited by Ritu1; Aug 16 '07, 06:21 PM. Reason: provided more details
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Possible with the help of PLSQL

    [code=oracle]

    CREATE TABLE EMP1
    (
    ID NUMBER NOT NULL,
    NAME VARCHAR2(100 BYTE) NOT NULL,
    NO CHAR(1 BYTE),
    HIRE_DATE DATE,
    DATA_TEXT LONG RAW
    )

    declare
    dat varchar2(100);
    begin
    select data_text into dat from emp1 where id=4;
    dbms_output.put _line(dat);
    end;

    [/code]

    Comment

    • Pilgrim333
      New Member
      • Oct 2008
      • 127

      #3
      It depends on the size of the long raw.

      Pilgrim.

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Yes it depends on the amount of data stored in a long raw. If it is large and cannot be hold by a varchar variable then you will need to fix that.

        Comment

        Working...