0

Hi,

I am trying to generate a spool file through below anonymous block in order to find out views on a particualar table.

declare
cursor c1 is select view_name,text from users_view;
rt c1%rowtype;
begin
open c1;
loop
fetch c1 into rt;
exit when c1%notfound;
dbms_output.put_line(rt.view_name || '|' || rt.text);
end loop;
end;

When I run it I get an error as "numeric or value errors", however if I remove text(LONG) column from cursor defination the block goes through without any error.

I understand that we can not use LONG data type in a where clause but is it that it can't be fetched in a cursor as well? If yes, what can be the alternative in this case?

2
Contributors
1
Reply
11
Views
4 Years
Discussion Span
Last Post by rubberman
0

LONG types (blobs basically) usually have to be fetched separately. What is stored in the table is a link to the actual data, which may be in an external file. Read the Oracle documentation on how to do that. I haven't done this for almost 10 years so that's as much as I can tell you without excessive time spent doing what you need to do yourself... :-)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.