|
-
Group By for columns that are data type text
Hi there
I have a SQL query similar to the following;
select appnum, sum(assetcost), notes from contracts
group by appnum, notes
The notes column is of data type text. This statement fails because columns
with a data type of text cannot be part of a group by statement. The
application has been in production for a year so I cannot change the notes
field to a varchar() data type (nor do I want to, because the client treats
unlimited notes space as a big plus over their previous application). How
can I get a Group By statement to work when one of the columns is data type
text?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks