tblMain.JobNo has an auto generated number in groups. Sometimes some groups get out of sequence as shown below. I need to re-order these groups in order to put them in sequence. Any assistance will be appreciated.
Format:
20080409-WC-123-11-01 '<<<--- Group 1 begins from here
yyyymmdd-Group- Incremental
************
20080312-TA-345-231-01 '<<<--- Group 2 Begins here
yyyymmdd -Group- Incremental
The following two groups are out of sequences
tblMain.ID tblMain.JobNo
1 20080401-WC-123-11-01
2 20080408-WC-123-11-03
6 20080408-WC-123-11-05
9 20080409-WC-123-11-09
11 20080301-TA-345-231-01
15 20080314-TA-345-231-04
16 20080321-TA-345-231-05
**************************
**********
**********
***
Here is what it should look like after re-ordering:
tblMain.ID tblMain.JobNo
1 20080401-WC-123-11-01
2 20080408-WC-123-11-02
6 20080408-WC-123-11-03
9 20080409-WC-123-11-04
11 20080301-TA-345-231-01
15 20080314-TA-345-231-02
16 20080321-TA-345-231-03
Note that Dates does not affect the group....only the last two digits of each groups are re-ordered.
Start Free Trial