"user does not exist" error when running SQL DDL

Asked 2 years ago, Updated 2 years ago, 43 views

As per the title, when running DDL on Oracle SQL Developer
What should I do if I see an error similar to the following?

error message

 ORA-01435—User does not exist.
01435.00000 - "user does not exist"

SQL run

 -------------------------------
-- New FUNCTION
-- SHIFT
---------------------------
CREATE OR REPLACE FUNCTION "SICSPC". "SHIFT" 
( 
    P_DATE IN DATE
 )
RETURN VARCHAR2
AS
  str_rtn VARCHAR2(2);
BEGIN
  SELECT
    CASE WHEN EXTRACT (HOUR FROM CAST (P_DATE AS TIMESTAMP)) <8THEN'N'
         WHEN EXTRACT (HOUR FROM CAST (P_DATE AS TIMESTAMP)) <20THEN'D'
         ELSE 'N'
     END
    INTO str_rtn
    FROM DUAL;
  RETURN str_rtn;
ENDSHIFT;
/

sql

2022-09-30 19:55

1 Answers

Since "SICSPC" in CREATE OR REPLACE FUNCTION "SICSPC". "SHIFT" is the username,
Change to existing username.

CREATE OR REPLACE FUNCTION "SICSPC". "SHIFT" 
( 
    P_DATE IN DATE
 )
RETURN VARCHAR2
AS
  str_rtn VARCHAR2(2);
BEGIN
  SELECT
    CASE WHEN EXTRACT (HOUR FROM CAST (P_DATE AS TIMESTAMP)) <8THEN'N'
         WHEN EXTRACT (HOUR FROM CAST (P_DATE AS TIMESTAMP)) <20THEN'D'
         ELSE 'N'
     END
    INTO str_rtn
    FROM DUAL;
  RETURN str_rtn;
ENDSHIFT;
/


2022-09-30 19:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.