Message posté par : Vincent
----------------------------------------
-----------------
Citation :
J'ai testé avec la méthode Case, when..., Mais ce n'est pas vraiment adapté à ma
situation
-----------------
Pour cela, il aurait fallu rouler la procédure 5 fois :
1- WHEN [ARBRE 1] = "PRESENCE" THEN 1
2- WHEN [ARBRE 2] = "PRESENCE" THEN [SCORE] + 1
3 - WHEN [ARBRE 3] = "PRESENCE"THEN [SCORE] + 1
4 - WHEN [ARBRE 4] = "PRESENCE" THEN [SCORE] + 1
5- WHEN [SCORE] = 0 OR [SCORE] = 1 OR [SCORE] = 2 THEN 0
WHEN [SCORE] = 3 THEN 1
WHEN [SCORE] = 4 THEN 2
END
Ou faire comme ceci (ce qui est tout aussi fastidieux) :
Update [EXERCICE] set [SCORE] =
CASE
WHEN [ARBRE 1] = "PRESENCE", [ARBRE 2] = "ABSENCE", [ARBRE 3] =
"ABSENCE", [ARBRE 4] = "ABSENCE" THEN 0
WHEN [ARBRE 1] = "PRESENCE", [ARBRE 2] = "PRESENCE", [ARBRE 3] =
"ABSENCE", [ARBRE 4] = "ABSENCE" THEN 0
[6 autres fois pour passer toutes les possibilités...]
END
----------------------------------------
Le message est situé
https://georezo.net/forum/viewtopic.php?pid=322944#p322944
Pour y répondre : qgis_fr(a)ml.georezo.net ou reply de votre messagerie
Pour vous désabonner connectez-vous sur le forum puis Profil / Abonnement
--
Association GeoRezo - le portail géomatique
https://georezo.net