open oc_result for
    select style_no into num_temp
    from tbsmp_sample_tag_header a
    where a.comp_code = 'G'
 ---> open oc_result for
    select a.style_no     from tbsmp_sample_tag_header a
    where a.comp_code = 'G'

解决方案 »

  1.   

    str varchar2(50);
    ....
    str:='select a.style_no from tbsmp_sample_tag_header a where a.comp_code = '''G'''';
    execute immediate str into num_temp;
      

  2.   

    into num_temp去掉之後
    怎麼看style_no的值,我現在就是要看style_no的值。
      

  3.   

    beckhambobo(beckham) 用你的執行之後,數字或值錯誤,字元字串緩沖區太小。
      

  4.   

    注意区分pl/sql和sqlPlus两种执行环境。