Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-04-09
8
Medium Priority
?
2,660 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: 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!

 

Author Comment

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

Accepted Solution

by:
MohanKNair earned 1000 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 1000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
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
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

636 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