.. have compilation errors
CREATE OR REPLACE PROCEDURE PROC_INSERT_ATTRIBUTES
( vstamina player_attributes.stamina%TYPE
, vplaymaking player_attributes.playmaking%TYPE
, vwinger player_attributes.winger%TYPE
, vscoring player_attributes.scoring%TYPE
, vgoaltending player_attributes.goaltending%TYPE
, vpassing player_attributes.passing%TYPE
, vdefending player_attributes.defending%TYPE
, vsetpieces player_attributes.setpieces%TYPE)
IS
BEGIN
SELECT attribute_id FROM PLAYER_ATTRIBUTES
WHERE stamina = vstamina
AND playmaking = vplaymaking
AND winger = vwinger
AND scoring = vscoring
AND goaltending = vgoaltending
AND passing = vpassing
AND defending = vdefending
AND setpieces = vsetpieces;
IF SQL%NOTFOUND
THEN INSERT INTO Player_Attributes VALUES
(SEQ_Attribute_id.NEXTVAL
, vstamina
, vplaymaking
, vwinger
, vscoring
, vgoaltending
, vpassing
, vdefending
, vsetpieces);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
END
/
CREATE OR REPLACE PROCEDURE PROC_INSERT_ATTRIBUTES
( vstamina player_attributes.stamina%TYPE
, vplaymaking player_attributes.playmaking%TYPE
, vwinger player_attributes.winger%TYPE
, vscoring player_attributes.scoring%TYPE
, vgoaltending player_attributes.goaltending%TYPE
, vpassing player_attributes.passing%TYPE
, vdefending player_attributes.defending%TYPE
, vsetpieces player_attributes.setpieces%TYPE)
IS
BEGIN
SELECT attribute_id FROM PLAYER_ATTRIBUTES
WHERE stamina = vstamina
AND playmaking = vplaymaking
AND winger = vwinger
AND scoring = vscoring
AND goaltending = vgoaltending
AND passing = vpassing
AND defending = vdefending
AND setpieces = vsetpieces;
IF SQL%NOTFOUND
THEN INSERT INTO Player_Attributes VALUES
(SEQ_Attribute_id.NEXTVAL
, vstamina
, vplaymaking
, vwinger
, vscoring
, vgoaltending
, vpassing
, vdefending
, vsetpieces);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
END
/