GIP
asked on
Count of same row
Hi,
I want to know if there are function to return count of the same row data in DataTable
Example
City, Name
New York, Paul
Boston, Catherine
New York, Cathy
New York, Debby
I want the number of city
In this example, the answer is two (New York, Boston)
I want to know if there are function to return count of the same row data in DataTable
Example
City, Name
New York, Paul
Boston, Catherine
New York, Cathy
New York, Debby
I want the number of city
In this example, the answer is two (New York, Boston)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I decided to use a second table in my SQL query to return my value
Shaune thank you for your answer too.
Shaune thank you for your answer too.
SELECT COUNT(Distinct NomFamille) From #TempCommandeExcel
This link is to the overload that will only add distinct values to the new table based on the selected columns:
http://msdn.microsoft.com/en-us/library/wec2b2e6(v=vs.110).aspx