oracle函数中用动态sql总出错,提示:ORA-06571: 函数MYIF不能保证不更新数据库

解决方案 »

  1.   

    你是不是用execute immediate str来做的?你的动态sql只能调用dbms_sql来处理,8.0.5不支持
    不能用execute immediate str来做
      

  2.   

    ORA-06571 Function string does not guarantee not to update databaseCause: One of the following:A SQL statement references a packaged, PL/SQL function that does not contain a pragma that prevents the database from being updated. 
    A SQL statement references a standalone, PL/SQL function that contains an instruction to update the database. 
    Action: If the referenced function is a packaged, PL/SQL function, re-create the PL/SQL function with the required pragma; be certain to include the 'Write No Database State' (WNDS) argument in the argument list of the pragma. If the referenced function is standalone, PL/SQL function, do not use the function.把代码贴出来