Error: ORA-00955: name is already used by an existing object in Oracle Function

こ雲淡風輕ζ 提交于 2019-12-11 08:56:54

问题


I have function which i am trying to compile and getting an error as Error: ORA-00955: name is already used by an existing object. I am really not aware of this error and try to search for this issue but did not find any solution. I dont know is this related to any grant priviledges but i dont have priviledges issue to my schema tables.

create or replace FUNCTION "AK_CHECK" 
-- PUBLIC
(ID Number) RETURN Number
IS
  TYPE_ID Number := 0;
  SUCCESS Number := 0;
  S Number := 0;
BEGIN
  SELECT ACTIVE(ID) + MANUAL(ID) INTO S FROM DUAL;
  CASE S
  WHEN 2 THEN
   SELECT TYPE INTO TYPE_ID
   FROM SALE_SUPPLY KD
   WHERE KD.KPI_DEF_ID = ID;    
  END CASE;
END AK_CHECK;

回答1:


You probably have another object with the same name (PERFORM_CHECK).

You can find it by quering user_objects:

select *
from   user_objects
where  object_name = 'PERFORM_CHECK'

Then drop it (replace TYPE_OF_OBJECT by the type of the object from the above query):

 drop TYPE_OF_OBJECT perform_check


来源:https://stackoverflow.com/questions/30705219/error-ora-00955-name-is-already-used-by-an-existing-object-in-oracle-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!