how to count the column value
-
The table has columns batch_id, task_id, seq. One batch_id has several task_id and one task_id can have several seq. task_id can be A, B, C or others. I need to write a sql command that can get a table: count(task_id when task_id = value1), count (task_id when task_id = value2),... Can anyone help me that how to change the column value to be a column? :(
-
The table has columns batch_id, task_id, seq. One batch_id has several task_id and one task_id can have several seq. task_id can be A, B, C or others. I need to write a sql command that can get a table: count(task_id when task_id = value1), count (task_id when task_id = value2),... Can anyone help me that how to change the column value to be a column? :(
-
The table has columns batch_id, task_id, seq. One batch_id has several task_id and one task_id can have several seq. task_id can be A, B, C or others. I need to write a sql command that can get a table: count(task_id when task_id = value1), count (task_id when task_id = value2),... Can anyone help me that how to change the column value to be a column? :(
Use Pivot.... Check this : http://technet.microsoft.com/en-us/library/ms177410.aspx[^]:thumbsup: Is this the right place to ask this. There is separate forum for this. :mad:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Windows7 API Code Pack
Simplify Code Using NDepend
Basics of Bing Search API using .NET -
Use Pivot.... Check this : http://technet.microsoft.com/en-us/library/ms177410.aspx[^]:thumbsup: Is this the right place to ask this. There is separate forum for this. :mad:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Windows7 API Code Pack
Simplify Code Using NDepend
Basics of Bing Search API using .NETThanks for you answer and your reminding.