Parenthèse dans une procedure
J'ai un problème bizarre avec une procedure ,
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| -- Creation de la procedure Proc_ManageThematique
CREATE OR REPLACE PROCEDURE proc_managethematique
(
type_manage VARCHAR2(1)
, n_no t_thematique.no%TYPE
, v_nom t_thematique.nom%TYPE
, n_statut t_thematique.status%TYPE
) IS
BEGIN
CASE type_manage
-- En cas d'ajout
WHEN 'A' THEN
INSERT INTO
t_thematique
VALUES
(n_no, v_nom, n_statut) ;
-- En cas de modification
WHEN 'M' THEN
UPDATE
t_thematique
SET
nom = v_nom
WHERE
no = n_no ;
-- En cas de desactivation
WHEN 'D' THEN
UPDATE
t_thematique
SET
status = 0
WHERE
no = n_no ;
ELSE
NULL ;
END CASE ;
END ;
/ |
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| @ proc_managethematique
Warning: Procedure created with compilation errors.
SQL> show errors ;
Errors for PROCEDURE PROC_MANAGETHEMATIQUE:
LINE/COL
--------------------------------------------------------------------------------
ERROR
--------------------------------------------------------------------------------
3/26
PLS-00103: Encountered the symbol "(" when expecting one of the following:
:= . ) , @ % default character
The symbol ":=" was substituted for "(" to continue. |
Quand je replace varchar2(1) par varchar2 ça marche sans erreurs, qu'est ce que se passe ?