Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modifying one field on multiple records with 3 values
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00487642
Message ID:
00489046
Views:
11
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform