Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I have a spreadsheet that contains a country code and its currency rate with respect to my country. Each country code appears twice in the Excel sheet with 2 different values.

I want to get the average of the 2 values and save the average to the first row. I was thinking of doing so by inserting the first row, reading the second row, and if the country code exists, do the average and save to the first, otherwise add the row to the list.

How is such feasible in SQL code?
Posted
Updated 9-Sep-11 0:26am
v2
Comments
Slacker007 9-Sep-11 6:27am    
Are you trying to do this in Excel or in SQL Server?

-- Edited for readability and tags.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900