cdhbs
asked on
select text field in query with aggregate function
How do I include a text (or ntext) field in a query that uses an aggregate function
eg
SELECT textField, someOtherField, COUNT(anotherFieldAgain) AS Total
FROM tblTable
GROUP BY textField, someOtherField
In MS access I could use the FIRST or LAST function to do this (on a SQL Server back-end) - and not include it in the group by clause. How do I do this in SQL Server?
eg
SELECT textField, someOtherField, COUNT(anotherFieldAgain) AS Total
FROM tblTable
GROUP BY textField, someOtherField
In MS access I could use the FIRST or LAST function to do this (on a SQL Server back-end) - and not include it in the group by clause. How do I do this in SQL Server?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER