Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modifying one field on multiple records with 3 values
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00487642
Message ID:
00489046
Vues:
12
>If you have an IDENTITY column, maybe your could play a game with MOD()
>
>-Mike

That certainly worked. Here it is:

UPDATE tblMyTable
SET Field1 = CASE UID % 3
WHEN 0 THEN RTRIM(Field1) + 'a'
WHEN 1 THEN RTRIM(Field1) + 'b'
WHEN 2 THEN RTRIM(Field1) + 'c'
END
WHERE

Thanks Michael.
Aristotle
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform