Solved

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

Posted on 2007-04-09
8
2,645 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
Repeat query 13 46
oracle- set role and grant privileges 6 28
migration MS SQL database to Oracle 30 59
ORA-02288: invalid OPEN mode 2 11
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to recover a database from a user managed backup

813 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

10 Experts available now in Live!

Get 1:1 Help Now