Someone please help a rusty old hack. ;-)
I have the following situation that I have been unable
to work out a (SQL Server) query for:
TABLE:
RECORDID SERVICE TRANSACTION
======== ======= ===========
1000 1 3
1001 1 6
1002 100 1
1003 2 7
1004 5250 1
1005 100 2
I need a query that returns one row per each distinct
SERVICE where the TRANSACTION numberis the greatest for
that SERVICE.
In the example above, the results would be:
RECORDID SERVICE TRANSACTION
======== ======= ===========
1001 1 6
1003 2 7
1004 5250 1
1005 100 2
There are 1000's of SERVICE numbers and 10's of thousands
of RECORDID's.
Thanks,
Mac
I have the following situation that I have been unable
to work out a (SQL Server) query for:
TABLE:
RECORDID SERVICE TRANSACTION
======== ======= ===========
1000 1 3
1001 1 6
1002 100 1
1003 2 7
1004 5250 1
1005 100 2
I need a query that returns one row per each distinct
SERVICE where the TRANSACTION numberis the greatest for
that SERVICE.
In the example above, the results would be:
RECORDID SERVICE TRANSACTION
======== ======= ===========
1001 1 6
1003 2 7
1004 5250 1
1005 100 2
There are 1000's of SERVICE numbers and 10's of thousands
of RECORDID's.
Thanks,
Mac