• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2664
  • Last Modified:

how read and write in column long raw in PL/SQL

Hi,

Exists character data in a table in format long raw, and I need to read this data in long raw and how to write in pl/sql in oracle 10gr2

regards

Gerid Garcia
0
yerai
Asked:
yerai
2 Solutions
 
MohanKNairCommented:
LONG RAW data types works the same as varchar2.

declare
l2 long raw;
l1 long raw;
begin
select raw_col INTO l2 from <tableA>;
l1:=substr(l2, 356789,55);
end;
/

0
 
yeraiAuthor Commented:
i need the data in ascii it's look how hexa
0
 
MohanKNairCommented:
The function RAWTOHEX converts raw to a character value containing its hexadecimal equivalent.
http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/functions110.htm
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
yeraiAuthor Commented:
i need to convert the raw to char
0
 
MohanKNairCommented:
user chr function to convert the ascii value to the character. This has to be done for each character.
0
 
sujith80Commented:
Oracle supplied package UTL_RAW has many functions to manipulate RAW DATA.

Are you looking for RAW to VARCHAR2 conversion using utl_raw.cast_to_varchar2??
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now