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.
| Author |
Topic |
|
lols
Posting Yak Master
174 Posts |
Posted - 2008-03-03 : 06:10:09
|
Hi,I have the following query :select uname, count(ID) from tbh_Axisgroup by unamewhich works fine and displays Admin 3User1 8 How can i display the result as :Admin(3)User1(8) When I do this:select uname + '(' + count(ID) + ')' from tbh_Axisgroup by unameIt doesnt work. |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-03-03 : 06:14:48
|
quote: Originally posted by lols Hi,I have the following query :select uname, count(ID) from tbh_Axisgroup by unamewhich works fine and displays Admin 3User1 8 How can i display the result as :Admin(3)User1(8) When I do this:select uname + '(' + cast(count(ID) as varchar(5)) + ')' from tbh_Axisgroup by unameIt doesnt work.
Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
lols
Posting Yak Master
174 Posts |
Posted - 2008-03-03 : 06:28:16
|
| thanks very much |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-03-03 : 07:34:53
|
| But if you want to show that data in front end application, do the same thereMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|