Home » Developer & Programmer » Forms » problem with BLOB column in cursor (form 6i)
problem with BLOB column in cursor [message #577778] Wed, 20 February 2013 07:30 Go to next message
alijeyan
Messages: 184
Registered: January 2007
Location: IRAN
Senior Member
I have a table with a BLOB column ;
I want read data from table and insert to another table with a cursor
My code is :
 procedure read_data  is 

  cursor get_data is
    select id,image from picture1;

id1 number;
pic blob;
 begin
   open get_data;
   loop
          fetch get_data into id1,pic;
          exit when get_data%notfound;

          if id1>1000 then
             insert into pic_tab values ( id1,pic );

          end if;
   end loop;
   commit;
   close get_data;
  end;


when I run form , error FRM-40734 occured

error in line " fetch .... "

please help
Re: problem with BLOB column in cursor [message #577780 is a reply to message #577778] Wed, 20 February 2013 07:59 Go to previous message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why not just write a single insert/select:
INSERT INTO pic_tab SELECT id, image FROM picture1 where id > 1000;
Previous Topic: How to copy values from one table to another using WHEN-BUTTON-PRESSED trigger?
Next Topic: Set_Block_Property
Goto Forum:
  


Current Time: Mon Jul 01 10:35:46 CDT 2024