Hi everybody,
I'm having a problem with an sql query that i use for my mobile application which uses sql server 2005 ce. I'm not so good with t-sql, so have a problem with this query
SELECT TP.ID_TASK_MASTER, TP.ID_PROBLEM, TP.ID_TASK_PROBLE, P.DS_PROBLEM,
TP.SW_HASOK, TP.SW_HASNOK, TP.SW_HASTOK, TP.SW_HASVALUE,
TP.NO_VALUE1, TP.NO_VALUE2
FROM TASK_PROBLEMS TP
INNER JOIN PROBLEMS P
ON TP.ID_PROBLEM = P.ID_PROBLEM
GROUP BY P.DS_PROBLEM,TP.ID_TASK_MASTER, TP.ID_PROBLEM, TP.ID_TASK_PROBLE
HAVING TP.ID_TASK_MASTER = @P_IDTASKMASTER
What i try to do is doing a group by on ds_problem field, getting an error like this :
{"In aggregate and grouping expressions, the SELECT clause can contain only aggregates and grouping expressions. [ Select clause = TP,SW_HASOK ]"}
So what i made wrong? Thanks..