I have the following table:
UseAcct UseName Vol Allocation
12917950 12917950 158
129CTTWL 12917950 4043
18511112 18511112 5690
24515576 245TOM 131
24535027 245TOM 5000
I need to put an "X" beside the UseAcct that has the highest Vol in a group of UseName (Example: 129CTTWL has the highest Vol in UseName group 12917950). In situations like UseAcct 18511112 the "X" would be placed beside the 5690. How would I do this in TSQL? BTW, I am on SQL Server 2005. Any help would be appreciated.
UseAcct UseName Vol Allocation
12917950 12917950 158
129CTTWL 12917950 4043
18511112 18511112 5690
24515576 245TOM 131
24535027 245TOM 5000
I need to put an "X" beside the UseAcct that has the highest Vol in a group of UseName (Example: 129CTTWL has the highest Vol in UseName group 12917950). In situations like UseAcct 18511112 the "X" would be placed beside the 5690. How would I do this in TSQL? BTW, I am on SQL Server 2005. Any help would be appreciated.