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;
/
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;
/
© 2024 OneMinuteCode. All rights reserved.