Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2009

    Unanswered: Could not do a physical-order read to fetch next row

    i am geting an error Could not do a physical-order read to fetch next row just after execution of a this procedure am checking some fields and at last am inserting some values to a particular table.just after the execution of this procedure i am selecting from the same table which we did insertion in this selection am getting this error .how can i release this table just after the execution of procedure to do selection properly.

    procedure is given below...

    CREATE PROCEDURE savetabledetails(var_table_name char(20),var_row_id char(20),var_action_occured char(20))
    DEFINE var_pkid_name char(20);
    DEFINE var_column_name char(20);
    DEFINE var_column_length char(20);
    DEFINE i int;
    DEFINE var_ar_pk_id char(20);
    DEFINE var_ar_alert_id char(20);
    DEFINE var_al_when char(20);
    DEFINE var_al_numberof_days char(20);
    DEFINE var_ba_pk_id char(20);
    DEFINE var_query lvarchar(2000);
    DEFINE var_query1 lvarchar(2000);
    LET i = 0;
    select first 1 colname into var_pkid_name from syscolumns where tabid=(select tabid from systables where tabname=var_table_name);
    foreach select colname into var_column_name from syscolumns where tabid=(select tabid from systables where tabname=var_table_name)
    FOREACH SELECT ar_pk_id ,ar_alert_id INTO var_ar_pk_id,var_ar_alert_id FROM bam_alert_rule where (ar_l_table_name=var_table_name and ar_l_field= var_column_name) or (ar_r_table_name=var_table_name and ar_r_field= var_column_name)
    IF( var_ar_pk_id is not null and var_ar_alert_id is not null ) then
    select ba_pk_id into var_ba_pk_id from bam_alert_actions where ba_alert_id=var_ar_alert_id and ba_action_id like ""||var_action_occured||"";
    if(var_ba_pk_id is not null) then
    select al_when,al_numberof_days into var_al_when ,var_al_numberof_days from bam_alerts where al_pk_id=var_ar_alert_id;
    insert into bam_alert_table_details(bat_pk_id,bat_alert_id,bat _table_name,bat_field_name,bat_row_id,bat_alert_st atus,bat_name_pkid,bat_action_occured,bat_alert_wh en,bat_no_of_days)values(bam_changed_table_details _seq.NEXTVAL,var_ar_alert_id,var_table_name,var_co lumn_name,var_row_id ,'Pending',var_pkid_name,var_action_occured,var_al _when,var_al_numberof_days);

    end if;
    END IF;




    someone please help me...its very urgent
    Last edited by yassar; 03-10-10 at 00:40.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts