Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
OSE
Commits
79a01dd3
Commit
79a01dd3
authored
Aug 30, 2021
by
Laurent Lécluse
Browse files
Update INTERVENANT_CK.sql
parent
97bdff58
Changes
1
Hide whitespace changes
Inline
Side-by-side
data/ddl/trigger/INTERVENANT_CK.sql
View file @
79a01dd3
...
...
@@ -20,12 +20,6 @@ BEGIN
END
IF
;
-- Contrôle de l'unicité de SOURCE_CODE
SELECT
COUNT
(
*
)
INTO
cs
FROM
INTERVENANT
WHERE
id
<>
:
NEW
.
id
AND
histo_destruction
IS
NULL
AND
source_code
=
:
NEW
.
source_code
AND
annee_id
=
:
NEW
.
annee_id
AND
statut_id
=
:
NEW
.
statut_id
;
IF
cs
>
0
THEN
raise_application_error
(
-
20101
,
'Une autre fiche intervenant contient la même valeur pour SOURCE_CODE.'
);
END
IF
;
-- Contrôle de l'unicité de STATUT_ID
SELECT
COUNT
(
*
)
INTO
cs
FROM
INTERVENANT
WHERE
id
<>
:
NEW
.
id
AND
histo_destruction
IS
NULL
...
...
@@ -48,4 +42,4 @@ BEGIN
raise_application_error
(
-
20101
,
'L
''
utilisateur est déjà utilisé pour un autre intervenant. Merci d
''
en choisir un autre.'
);
END
IF
;
END
;
\ No newline at end of file
END
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment