我的function中有一段
v_StartTime := round(to_number(to_date(to_char(SYS_EXTRACT_UTC(FROM_TZ(TO_TIMESTAMP(v_DateStr,'yyyy-mm-dd hh24:mi:ss'),SESSIONTIMEZONE)),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')-to_date('1970-1-1','yyyy-mm-dd'))*86400);提示标题的错误。在公司编译通过,公司环境是oracle92
在家里用直接用sql语句也可以用'SYS_EXTRACT_UTC',但function就是编译失败。
家里的是oracle90

解决方案 »

  1.   

    PLS-00201 identifier 'string' must be declared  Cause
    An attempt was made to reference either an undeclared variable, exception, procedure, or other item, or an item to which no privilege was granted or an item to which privilege was granted only through a role.  
    Action
     1.Check your spelling and declaration of the referenced name. 
    2.Verify that the declaration for the referenced item is placed correctly in the block structure. 
    3.If the referenced item is indeed declared but you do not have privileges to refer to that item, for security reasons, you will be notified only that the item is not declared. 
    4.If the referenced item is indeed declared and you believe that you have privileges to refer to that item, check the privileges; if the privileges were granted only via a role, then this is expected and documented behavior. Stored objects (packages, procedures, functions, triggers, views) run in the security domain of the object owner with no roles enabled except PUBLIC. Again, you will be notified only that the item was not declared.  
      

  2.   

    你当前用户没有使用  SYS_EXTRACT_UTC的权限