Can I determine what the 1st and last entries are with a key from a different table
For example I have a job parts table (ID= JOBPARTID). There is a specific part that may be replaced several times. I keep these parts on a separate table called swaps. The swaps table is purely
SWAPID (KEY)
JOBPARTID
PART
PARTDESCRIPTION
SO on file I'll have
SWAPID JOBPARTID PART PARTDESCRIPTION
001 1234 PART1 DESC1
002 4231 PART2 DESC2
003 1234 PART3 DESC3
004 1229 PART4 DESC4
005 3241 PART5 DESC5
006 1230 PART6 DESC6
007 1234 PART7 DESC7
008 3289 PART8 DESC8
For JOBPARTID I want to be able to get the first record (SWAPID =001 for PART1) and the last one (SWAPID = 007 for PART 7).
How do i go about it?
Thanks in advance.
For example I have a job parts table (ID= JOBPARTID). There is a specific part that may be replaced several times. I keep these parts on a separate table called swaps. The swaps table is purely
SWAPID (KEY)
JOBPARTID
PART
PARTDESCRIPTION
SO on file I'll have
SWAPID JOBPARTID PART PARTDESCRIPTION
001 1234 PART1 DESC1
002 4231 PART2 DESC2
003 1234 PART3 DESC3
004 1229 PART4 DESC4
005 3241 PART5 DESC5
006 1230 PART6 DESC6
007 1234 PART7 DESC7
008 3289 PART8 DESC8
For JOBPARTID I want to be able to get the first record (SWAPID =001 for PART1) and the last one (SWAPID = 007 for PART 7).
How do i go about it?
Thanks in advance.