Solved

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

Posted on 2007-04-09
8
2,639 Views
Last Modified: 2012-05-05
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
Comment
Question by:yerai
8 Comments
 
LVL 16

Expert Comment

by:MohanKNair
ID: 18877901
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
 

Author Comment

by:yerai
ID: 18878951
i need the data in ascii it's look how hexa
0
 
LVL 16

Expert Comment

by:MohanKNair
ID: 18878968
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:yerai
ID: 18879209
i need to convert the raw to char
0
 
LVL 16

Accepted Solution

by:
MohanKNair earned 250 total points
ID: 18879256
user chr function to convert the ascii value to the character. This has to be done for each character.
0
 
LVL 27

Assisted Solution

by:sujith80
sujith80 earned 250 total points
ID: 18880147
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
 
LVL 1

Expert Comment

by:Computer101
ID: 20591330
Forced accept.

Computer101
EE Admin
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now