We help IT Professionals succeed at work.

MS SQL: Return all results in a single row separated by commas

skij
skij asked
on
86 Views
Last Modified: 2018-03-21
This returns a 50 rows.  Instead, using MS SQL, how can I get one single row with all 50 values separated by commas?

SELECT 
  TOP 50
  NAME
  FROM [my].[dbo].[table]
    WHERE 
	PROJECTID = 699461 
	GROUP BY NAME
    ORDER BY count(NAME) DESC

Open in new window

Comment
Watch Question

Professional Troublemaker^h^h^h^h^hshooter
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.