I have a little task that I need to accomplish, but I'm not sure how to go about it. I have the following database structure (this is just a small part of the data, just dummy stuff since the real stuff has health care provider info in it):
ProviderNumber ProviderName
900404 Windows Test 1
900405 Windows Test 1
900406 Windows Test 1
900683 Windows Test 45
900684 Windows Test 45
901616 Windows Test 4595bg
901528 nother record 55
902407 nother record 55
902219 Windows Test 1a
902764 Windows Test 1b
902843 Windows Test 1b
902844 Windows Test 1b
What I need to do is determine the maximum Provider #, and then delete the OTHER records for each Provider Name. So essentially, there will be 1 record for each provider. Don't ask how the data got in it's current state, I have no idea! I am working on some SQL but I can't quite get there...
Thanks in advance for any advice anyone has!
ProviderNumber ProviderName
900404 Windows Test 1
900405 Windows Test 1
900406 Windows Test 1
900683 Windows Test 45
900684 Windows Test 45
901616 Windows Test 4595bg
901528 nother record 55
902407 nother record 55
902219 Windows Test 1a
902764 Windows Test 1b
902843 Windows Test 1b
902844 Windows Test 1b
What I need to do is determine the maximum Provider #, and then delete the OTHER records for each Provider Name. So essentially, there will be 1 record for each provider. Don't ask how the data got in it's current state, I have no idea! I am working on some SQL but I can't quite get there...
Thanks in advance for any advice anyone has!