Help:见内容,为什么提示 “ORA-00900: 无效 SQL 语句”?
CREATE OR REPLACE FUNCTION F_GETPREJOBTIME (CTABLE IN VARCHAR)
RETURN DATE IS
RESULTS USER_JOBS.LAST_DATE%TYPE;
BEGIN
SELECT LAST_DATE
INTO RESULTS
FROM USER_JOBS
WHERE WHAT LIKE CTABLE+ '% '
FOR UPDATE NOWAIT;
IF RESULTS IS NULL THEN
RETURN (TO_DATE( '2007-01-01 ', 'yyyy-MM-dd '));
ELSE
RETURN(RESULTS);
END IF;
END F_GETPREJOBTIME;
/
[解决办法]
SELECT LAST_DATE
INTO RESULTS
FROM USER_JOBS
WHERE WHAT LIKE CTABLE+ '% '
FOR UPDATE NOWAIT;
-----------------------------------------
SELECT LAST_DATE
INTO RESULTS
FROM USER_JOBS
WHERE WHAT LIKE CTABLE || '% '
FOR UPDATE NOWAIT;