I want to select the columns TeamProjectProjectNodeName & TestPlanName from the inner subquery. The inner query runs perfectly fine in fetching results from the view. But I am getting the below error, when I run the entire query as below -
Incorrect syntax near ')'.
Please help me with the same.
Here is my query -
select
x.TeamProjectProjectNodeName, x.TestPlanName
from
(select
TeamProjectProjectNodeName, TestPlanName,ResultOutcome, count(ResultOutcome)
from [Tfs_Warehouse].[dbo].[TestResultView]
where TestPlanName <> 'NULL'
GROUP BY TeamProjectProjectNodeName, TestPlanName, ResultOutcome
order by TeamProjectProjectNodeName asc, TestPlanName asc) x
Thanks.
order byfrom the subquery and place an alias on thecount(). Do you mean to use<> nullor do you wantis not null?