-
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.
-
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;
------------------------------------------------------
-
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.
-
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;
/
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|