larrydavid
Programmer
Hello,
I have output which is as follows:
There will always be two rows per CompanyID. Usually the first value will duplicate throughout all of the rows, but not always so I cannot simply filter in the WHERE clause.
I only want to select the second row for each CompanyID pair of records. for this output:
I don't have an identity column so if the solution requires I add one that's OK.
Any help is greatly appreciated.
Thanks,
Larry
I have output which is as follows:
Code:
CompanyID $_Paid $_Billed
22 181.38 67.88
22 5986.34 2279.03
23 181.38 67.88
23 4936.34 7279.03
24 181.38 67.88
24 9986.34 1279.03
There will always be two rows per CompanyID. Usually the first value will duplicate throughout all of the rows, but not always so I cannot simply filter in the WHERE clause.
I only want to select the second row for each CompanyID pair of records. for this output:
Code:
CompanyID $_Paid $_Billed
22 5986.34 2279.03
23 4936.34 7279.03
24 9986.34 1279.03
I don't have an identity column so if the solution requires I add one that's OK.
Any help is greatly appreciated.
Thanks,
Larry