即使我仔细检查了代码,我也会收到以下错误。我不知道我错过了什么。
LINE/COL 错误
31/1 PLS-00103:在预期以下情况之一时遇到符号“END”:
代码:
CREATE OR REPLACE PROCEDURE sp_ssjm_newworkorder
( workorderno IN NUMBER,
company IN CHAR,
attention IN CHAR,
datedue IN DATE,
loggedby IN CHAR
)
AS id NUMBER;
today DATE:=SYSDATE;
BEGIN
SELECT client_id --grab client_id
INTO id
FROM ssjm_client
WHERE ssjm_client.name=company;
IF id IS NULL THEN --check if client exists by checking if client_id is there
dbms_output.put_line('Please create client first');
GOTO the_end;
ELSE
INSERT INTO ssjm_workorder VALUES(workorderno,workorderno,company,loggedby,attention,'Received',today,datedue,id);
END IF;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20999,'An error occured in' ||
SQLCODE || '-ERROR-' || SQLERRM);
<<the_end>>
END sp_ssjm_newworkorder;