Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEGIN TRANSACTION AlphaSortGroupTypeOrder
- UPDATE dbo.GroupType
- SET [Order] = Alpha.AlphaOrder
- FROM dbo.GroupType GT
- JOIN (
- SELECT
- [Id],
- ROW_NUMBER() OVER(ORDER BY GT.[name] ASC) AS AlphaOrder,
- [Name]
- FROM GroupType GT
- ) Alpha ON Alpha.[Id] = GT.[Id]
- COMMIT TRANSACTION AlphaSortGroupTypeOrder
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement