Не могу понять как пофиксить ошибку
%%sql
--#SET TERMINATOR @
CREATE PROCEDURE UPDATE_LEADERS_SCORE(IN in_School_ID INTEGER, IN in_Leader_Score INTEGER)
LANGUAGE SQL
MODIFIES SQL DATA
BEGIN
UPDATE "CHICAGO_PUBLIC_SCHOOL"
SET "Leaders_Score" = in_Leader_Score
WHERE "School_ID" = in_School_ID;
IF in_Leader_Score >= 80 THEN
UPDATE "CHICAGO_PUBLIC_SCHOOLS"
SET "Leaders_Icon" = 'Very_Strong'
WHERE "School_ID" = in_School_ID;
ELSEIF in_Leader_Score >= 60 and in_Leader_Score <= 79 THEN
UPDATE "CHICAGO_PUBLIC_SCHOOLS"
SET "Leaders_Icon" = 'Strong'
WHERE "School_ID" = in_School_ID;
ELSEIF in_Leader_Score >= 40 and in_Leader_Score <= 59 THEN
UPDATE "CHICAGO_PUBLIC_SCHOOLS"
SET "Leaders_Icon" = 'Average'
WHERE "School_ID" = in_School_ID;
ELSEIF in_Leader_Score >= 20 and in_Leader_Score <= 39 THEN
UPDATE "CHICAGO_PUBLIC_SCHOOLS"
SET "Leaders_Icon" = 'Weak'
WHERE "School_ID" = in_School_ID;
ELSE
UPDATE "CHICAGO_PUBLIC_SCHOOLS"
SET "Leaders_Icon" = 'Very Weak'
WHERE "School_ID" = in_School_ID;
END IF;
END
@
An unexpected token "LANGUAGE SQL" was found following " ". Expected tokens may include: "<create_proc>"
Причём тут питон?
Обсуждают сегодня