Bonjour,
je voudrais traiter le résultat d'une requête select * from ..., ligne par ligne, et pour chaque ligne, réaliser une action.
Voici ci-dessous l'idée générale.
Merci de votre aide.
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 SET ServerOutput ON; DECLARE cursor op_imap is select * nom_table where condition BEGIN For i in op_imap loop If nom_champ in select nom_cham from nom_table2 where condition1 Then action1 where champ=nom_champ ; Else action2 where champ=nom_champ ; End if ; End loop ; END; / EXIT;
Partager