Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Group by varchar

Author  Topic 

venturer
Starting Member

3 Posts

Posted - 2009-01-19 : 10:21:17
How to do grouping of rows by coloumn with varchar datatype?
Using MS SQL

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-19 : 10:32:42
just use GROUP BY varcharcol
if this is not what you asked, please elaborate
Go to Top of Page

venturer
Starting Member

3 Posts

Posted - 2009-01-19 : 10:57:17
i get error saying group by clause cannot contain coloumn with varchar datatype.
Working with SQL server management studio.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-19 : 11:00:22
nope. i dont think thats the problem. can you post query used?
Go to Top of Page

venturer
Starting Member

3 Posts

Posted - 2009-01-19 : 11:21:55
thnkx for the help, i was using the wrong query. tried 'order by' and got the result.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-20 : 02:46:32
quote:
Originally posted by venturer

thnkx for the help, i was using the wrong query. tried 'order by' and got the result.


how would you group using order by? or was your reqmnt different from what you posted earlier?
Go to Top of Page
   

- Advertisement -