我正在撰写ELSE IF
条件,但它无效。
IF P_TYPE='College' THEN
INSERT INTO SAPID_INPUTDATA_WIFI(BOCID,BUILDING_RJID,LOCATION_TYPE,TYPE)VALUES
(P_BOCID,P_BUILDINGRJID,P_LOCATIONTYPE,P_TYPE) RETURNING ID INTO P_FLAG;
END IF;
ELSE IF P_TYPE='Public WiFi' AND P_LOCATIONTYPE ='Node BLDG' THEN
INSERT INTO
SAPID_INPUTDATA_WIFI(BUILDING_RJID,LOCATION_TYPE,TYPE)VALUES(P_BOCID,
P_BUILDINGRJID,P_LOCATIONTYPE,P_TYPE) RETURNING ID INTO P_FLAG;
END IF;
答案 0 :(得分:0)
主要问题是语法。试试这个:
IF P_TYPE='College' THEN
INSERT INTO SAPID_INPUTDATA_WIFI(
BOCID,
BUILDING_RJID,
LOCATION_TYPE,
TYPE)
VALUES(
P_BOCID,
P_BUILDINGRJID,
P_LOCATIONTYPE,
P_TYPE)
RETURNING ID INTO P_FLAG;
ELSIF P_TYPE='Public WiFi' AND P_LOCATIONTYPE ='Node BLDG' THEN
INSERT INTO SAPID_INPUTDATA_WIFI(
BUILDING_RJID,
LOCATION_TYPE,
TYPE)
VALUES(
P_BOCID,
P_BUILDINGRJID,
P_LOCATIONTYPE,
P_TYPE)
RETURNING ID INTO P_FLAG;
END IF;