venkat
venkat

Reputation: 21

query long raw data type

I have a oracle table with one of the column as long raw type. I know that we cannot use sql to get the data from that column.

Can any one tell me how to get all the data from that column?

Thanks in advance

Upvotes: 1

Views: 2162

Answers (3)

MichaelN
MichaelN

Reputation: 1744

You can use perl DBD::Oracle to query that table and write the data. You can use any program language you like with an oracle client/api that can pull that data out and write it to a file. You can also use oracle tools such as oracle exp/imp to move the data from db to db. Since you've not specfied what you want to do with the data in the long raw its hard to help you further.

Upvotes: 0

Gary Myers
Gary Myers

Reputation: 35401

You can ALWAYS use SQL to get data. In fact it is the only way to get data in or out of a database. The question is what format that data comes out in and what you do with it. Some SQL clients may not handle binary data nicely. Some will show it up as a stream of hex (which probably isn't very meaningful).

You could use PL/SQL and perhaps UTL_FILE to write the binary data out to a file on the server. Or look at the UTL_RAW package.

Upvotes: 1

Pop
Pop

Reputation: 4022

Did you try PL/SQL?

declare
  a mytable.rawcol%TYPE;
begin
  select rawcol into a from mytable;
  -- now do something with "a"
end;
/

Upvotes: 2

Related Questions