tags:

views:

272

answers:

3

Hi,

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

+1  A: 

Did you try PL/SQL?

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

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.

Gary
A: 

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.

MichaelN