Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does my proc ?

Status
Not open for further replies.

CTO1

Technical User
Jun 17, 2003
14
0
0
GB
.. 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
/
 
Define your select in an explicit cursor, or use INTO variables.

How many marks its that worth?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top