Hi everyone,
Please help.
I need to update my NewMgrID in tblManager table. What I need to do is group the records in
tblManager by State, then within each State, sort them by HiredDate in ascending order. I have
to update the NewMgrID starting with the record that has a smallest HiredDate (e.g. Manager
with ID = 10 in State of AR). Then assign that record starting with 01 and the next record
with 02, and so on (by adding 1 unit to the next smallerst HiredDate). I don't know how to
increase the number in NewMgrID field with the ascending order of HiredDate.
Can anyone help please. Thanks for your help in advance!
The table should look like this after assiging NewMgrID:
ManagerID State HiredDate NewMgrID
10 AR 1/1/00 01
11 AR 1/20/02 03
12 AR 1/22/00 02
13 CA 1/2/02 01
14 CA 1/4/02 02
15 CA 1/10/03 03
Please help.
I need to update my NewMgrID in tblManager table. What I need to do is group the records in
tblManager by State, then within each State, sort them by HiredDate in ascending order. I have
to update the NewMgrID starting with the record that has a smallest HiredDate (e.g. Manager
with ID = 10 in State of AR). Then assign that record starting with 01 and the next record
with 02, and so on (by adding 1 unit to the next smallerst HiredDate). I don't know how to
increase the number in NewMgrID field with the ascending order of HiredDate.
Can anyone help please. Thanks for your help in advance!
The table should look like this after assiging NewMgrID:
ManagerID State HiredDate NewMgrID
10 AR 1/1/00 01
11 AR 1/20/02 03
12 AR 1/22/00 02
13 CA 1/2/02 01
14 CA 1/4/02 02
15 CA 1/10/03 03