InertiaM
Well-known member
VB.NET:
[FONT="Courier New"]
ID WONUMBER ITEMCODE
1 8642 ABC1
2 8642 TESTA
3 8642 TESTB
4 8642 TESTC
5 8642 TESTD
6 8666 TESTE
7 8666 TESTF
8 8666 TESTG
9 8666 ABC2
10 8680 TESTH
11 8680 TESTJ
12 8680 DEF1
13 8680 TESTK
14 8681 DEF2
15 8682 ZYX9
[/FONT]
I need to run a query on the above records in SQL Server 2000, which will return the following
VB.NET:
[FONT="Courier New"]
ID WONUMBER ITEMCODE
1 8642 ABC1
9 8666 ABC2
12 8680 DEF1
14 8681 DEF2
15 8682 ZYX9
[/FONT]
because ABC1 is the first alphabetical (top) record of 8642, ABC2 is the first alphabetical (top) record etc.. This is only a small snapshot - there will be about 5000 records returned.
Any suggestions gratefully received
Last edited: