Solved

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

Posted on 2007-04-09
8
2,646 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PL/SQL Display based on value 4 39
SQL query question 8 93
Read XML values 8 42
format dd/mm/yyyy parameter 16 33
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
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…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

830 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