Bonjour,

Voici mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
Merge INTO Table1 A
    USING (SELECT
              D.CHAMP1,
              B.CHAMP2,
              E.CHAMP3,
              B.CHAMP4,
              B.CHAMP5,
              B.CHAMP6,
              B.CHAMP11
             FROM Table2 B, Table3 C, Table4 D, Table5 E
            WHERE
              D.CHAMP7 = B.CHAMP8
              AND B.CHAMP12  = 'AAAAA'
              AND E.TYPE='VALEUR1'
              AND UPPER(E.LIBELLE)=UPPER(B.CHAMP9)
              AND E.CHAMP3=1
              AND CHAMP10 = CURSEUR.CHAMP10
              AND B.CHAMP11 = C.CHAMP11
              ) F
 
    ON ( ......)
 
    When Matched Then
      UPDATE
 
    When Matched Then
      UPDATE
Peut-on mettre un CASE WHEN dans la partie

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
When NOT Matched Then
      INSERT
ou

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
When NOT Matched Then
      INSERT
Merci d'avance pour votre aide.

Un peu de mal avec Merge !!!

A+