Remplacer un Case dans une View
Bonjour,
Voila mon probléme: J'ai mis un CASE dans une VIEW apparemment SQL server 2000 aime pas trop ça car ce case provoque une alerte (Query designer does not support the case SQL construct) malgré cette alerte la View me renvois les résultats demandé mais je ne peut pas sauvegardé mon code après l'avoir lancé (mais avant oui ^^)
Ma question: y a t il une alternative au CASE? et en quoi l'alerte est dérangeante
voila mon case:
Code:
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
| BKG_Quantity = CASE
WHEN BKG_Loading_Type = 1 THEN '100'
WHEN BKG_Loading_Type = 2 THEN '116'
WHEN BKG_Loading_Type = 3 THEN '152'
WHEN BKG_Loading_Type = 4 THEN '76'
WHEN BKG_Loading_Type = 5 THEN '76'
WHEN BKG_Loading_Type = 6 THEN '106'
WHEN BKG_Loading_Type = 7 THEN '120'
WHEN BKG_Loading_Type = 8 THEN '100'
WHEN BKG_Loading_Type = 9 THEN '84'
WHEN BKG_Loading_Type = 10 THEN '78'
WHEN BKG_Loading_Type = 11 THEN '68'
WHEN BKG_Loading_Type = 12 THEN '152'
WHEN BKG_Loading_Type = 13 THEN '120'
WHEN BKG_Loading_Type = 14 THEN '60'
WHEN BKG_Loading_Type = 15 THEN '74'
WHEN BKG_Loading_Type = 21 THEN '128'
WHEN BKG_Loading_Type = 22 THEN '116'
WHEN BKG_Loading_Type = 23 THEN '140'
WHEN BKG_Loading_Type = 24 THEN '104'
WHEN BKG_Loading_Type = 99 THEN '180'
ELSE 'NA'
END |
Merci d'avance :ccool: