Unanswered: Assign increment value to a group of records
A simple table with columns: Lastname, RecLoc, Tktnbr all varchar type
What I would like to do is starting with a static given Tktnbr (like 9785-6054-219) incrementally assign a tktnbr to a group of records ordered by Lastname. Doing it manually in workbench would go something like this:
1) Select * From TableX Where RecLoc='HV3TM' Order By Lastname (say this returns 17 records ordered by Lastname).
2) Manually assign 9785-6054-219 in Tktnbr to the 1st record, 9785-6054-220 to the 2nd record, 9785-6054-2221 to the 3rd, ..... 9785-6054-234 to the 16th, 9785-6054-235 to the 17th record.
I know how to run an update statement with some calc; but when it comes to increment a value in a column, it's above my head. Any help will much appreciated.