Subject | increment |
---|---|
Author | Check_Mail |
Post date | 2017-06-15T13:26:57Z |
Hello,
How can I increment consisting records like this:
Year month order pos
2010 2 1 null
2010 2 1 null
2010 2 1 null
2010 3 2 null
Pos should be auto increment for all 2010 2 records, null to 1, the second record null to 2 til 4
Update table set pos = coalesce(pos,0)+1 where year = 2010 and month = 2 works not, all records have the pos=1 value
Thank you
Best regards
Olaf