Created
July 29, 2014 06:54
-
-
Save marcphilipp/75bed875730ac2a6b288 to your computer and use it in GitHub Desktop.
IndexColumn migration script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update tbl t1 | |
set t1.reihenfolge = (with t3 as | |
(select t2.id, row_number() over (partition by modell order by bo) nr | |
from tbl t2) | |
select nr from t3 | |
where t3.id = t1.id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment