About
Pricing
Community
Teams
Start Free Trial
Log in
goodk
asked on
12/27/2012
select (count(job) + job) from AceData group by job ??
select (count(job) + job) from AceData group by job
using ms sql server
the above not working
want to show,
25 myJob
30 otherjob
01 badjob
SQL
8
3
Last Comment
goodk
8/22/2022 - Mon
SOLUTION
Pratima
12/27/2012
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
goodk
12/27/2012
ASKER
I've requested that this question be deleted for the following reason:
resolved used str() to convert
SOLUTION
RehanYousaf
12/28/2012
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
awking00
12/28/2012
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
goodk
12/30/2012
ASKER
I tried this, should this be ok? The results looks fine
Select (type +' ('+ ltrim(str(count(type))) +')' ) as xtest from AceData group by type
goodk
12/30/2012
ASKER
thanks
Your help has saved me hundreds of hours of internet surfing.
fblack61
RehanYousaf
12/30/2012
Yes that will work but why use to functions when you can get away with one
In programming trick is to make things simple not complicated
Select (type +' ('+ convert(varchar,count(type)) +')' )
Select all
Open in new window
goodk
12/30/2012
ASKER
thanks
resolved used str() to convert