Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Sounds like a lookup table to me. Are you familiar with that concept?
Create another table with 2 columns:
- one for the "fieldz" value
- another for the mapped value
e.g.
code | map_value
-------------------------------
7 | 97
6 | 84
5 | 74
4 | 59
3 | 50
2 | 34
1 | 24
Then you can perform a SQL query to perform the mapping.
HTH,
Doug
>Dear All,
>I know it sounds crazy but how can make a conversion such as this one
>instead of typing the following will it be possible to do it in a loop
>Thanks to all
>
>If fieldz =7 replace fieldz WITH 97
>If fieldz =6 replace fieldz WITH 84
>If fieldz =5 replace fieldz WITH 74
>If fieldz =4 replace fieldz WITH 59
>If fieldz =3 replace fieldz WITH 50
>If fieldz =2 replace fieldz WITH 34
>If fieldz =1 replace fieldz WITH 24
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement