sql:="select * from f_action_record";
execute immediate sql;

解决方案 »

  1.   

    改成
    create or replace procedure p_total_content(small number,big number,n varchar) is
    big1 number;
    small1 number;
    begin
    commit;
      set transaction use rollback segment RBS1; 
      if big<small then
         small1:=big;
         big1:=small;
      else
          small1:=small;
          big1:=big;
      end if;
          execute immediate 'INSERT /*+APPEND */ INTO temp_total_content NOLOGGING 
             select my_content.content_id,my_content.action_id,my_content.total_byte,my_content.total_second, temp_content.content_name content_name
              from f_action_record:1 my_content,
                   fv_content_union  temp_content
             where my_content.content_id = temp_content.content_id and my_content.action_time between :2 and :3' using in n,in small1,in big1;
         commit; 
    end p_total_content;
    编译通过,但是调用过程的时候sql command not properly ended ora-06512 line 14,
    不解
      

  2.   

    f_action_record:1为什么这样写?
    你先把这个做为变量给另一个不行么?
    如:a:=b||'01'
    然后就符合你的要求了
      

  3.   

    这还不动态?
    你a:=b||n
    n=‘01’
    n的值随时变,你也可以把他做为入参我不明白,和你的要求有什么区别
      

  4.   

    还是有table not exist的错误的,调用的时候
      

  5.   

    f_action_record01 ...都是存在的,所以我很郁闷,不过我把参数改成tablestr varchar2,在串联的时候加整个表名就正确了