DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: long raw datatype

  1. #1
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    Hi Friends..

    I know Long Raw holds binary data.

    Is it possible to select the text inside a long raw column through sqlplus. I have tried and get numbers only.

    How is it possible to extract the text from this column wihout haing to go through the application?

    Thanks
    Suresh


    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    You can try to use : CAST_TO_VARCHAR2 Function from UTL_RAW package.
    This function converts a RAW represented using n data bytes into VARCHAR2 with n data bytes.

    ------------------------------------------------------
    UTL_RAW.CAST_TO_VARCHAR2 (r IN RAW) RETURN VARCHAR2;
    ------------------------------------------------------

  3. #3
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    Hi Shestakov

    can you please explain how to substitute input (r)

    owner : owner1
    table name : table1
    column_name column1
    column_type : long raw

    Thanks

    Suresh
    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  4. #4
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    1 as SYS you should execute script : utlraw.sql (/$ORACLE_HOME/rdbms/admin/utlraw.sql)

    2. in sqlplus (select)
    select UTL_RAW.CAST_TO_VARCHAR2(column1) from owner1.table1;

    3. in pl/sql

    declare
    c varchar2(4000);
    r row(4000);
    begin
    select column1 into r from owner1.table1;
    c := UTL_RAW.CAST_TO_VARCHAR2(r);
    end;
    /

  5. #5
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    Thanks for your help..
    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width