бы прояснить как пофиксить? подключение через ibm_db_sa
%%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>"
Дело не в названии базы а в движке.
подскажите, как я могу проверить?
Select @@version Запустите и посмотрите что вернёт
* ibm_db_sa://vgb61419:***@125f9f61-9715-46f9-9399-c8177b21803b.c1ogj3sd0tgtu0lqde00.databases.appdomain.cloud:30426/bludb;security=SSL (ibm_db_dbi.ProgrammingError) ibm_db_dbi::ProgrammingError: SQLNumResultCols failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0104N An unexpected token "END-OF-STATEMENT" was found following "select @@version". Expected tokens may include: "<table_expr>". SQLSTATE=42601\r SQLCODE=-104 [SQL: select @@version] (Background on this error at: https://sqlalche.me/e/14/f405)
А вот это SELECT * FROM SYSIBMADM.ENV_INST_INFO
Могу вам в личку скрин скинуть?
Обсуждают сегодня