I have one SELECT statement that needs to return one ntext field from
one table and count something from other table, problem is that all
fileds that are not in count have to be in group by and ntext can't be
in group by... i hope you understend what i want to say here :), so is
there any solution to this problem or what is the best workaraund you
would use?
example:
TABLE projects
project_id int
project_title nvarchar(50)
project_descrip tion ntext
TABLE users
user_id int
project_id int
SELECT projects.projec t_id, projects.projec t_title,
projects.projec t_description, count(users.*) AS number_od_users
FROM projects LEFT JOIN users ON projects.projec t_id=users.proj ect_id
GROUP BY projects.projec t_id, projects.projec t_title,
projects.projec t_description;
this select is something that would work for me...if it wasn't for that
tiny problem with ntext field
one table and count something from other table, problem is that all
fileds that are not in count have to be in group by and ntext can't be
in group by... i hope you understend what i want to say here :), so is
there any solution to this problem or what is the best workaraund you
would use?
example:
TABLE projects
project_id int
project_title nvarchar(50)
project_descrip tion ntext
TABLE users
user_id int
project_id int
SELECT projects.projec t_id, projects.projec t_title,
projects.projec t_description, count(users.*) AS number_od_users
FROM projects LEFT JOIN users ON projects.projec t_id=users.proj ect_id
GROUP BY projects.projec t_id, projects.projec t_title,
projects.projec t_description;
this select is something that would work for me...if it wasn't for that
tiny problem with ntext field
Comment