Bonjour,

J'aimerais planifier le script SQL qui suit pour qu'il s'exécute quotidiennement dans mon environnement AlternC. Quelqu'un peut m'aider à le faire ?
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
 
UPDATE Commandes  SET Echeance = 3 WHERE TypeInscription = "Adhesion 3 ans";
UPDATE Commandes  SET Echeance = 1 WHERE TypeInscription = "Adhesion 1 an";
UPDATE Membres m
INNER JOIN
(
	SELECT No_membre, MAX(Date_Adhesion) AS dern_date
	FROM Commandes
        WHERE TypeInscription <> "Don"
	GROUP BY No_membre
) tmp ON tmp.No_membre = m.No_membre
	INNER JOIN Commandes c
		ON c.No_membre = tmp.No_membre
		AND c.Date_Adhesion = tmp.dern_date
SET m.Date_Echeance = ADDDATE(tmp.dern_date, INTERVAL Echeance YEAR)

Merci !