close-ish... but it'll have a missing ' at the front, and extra ,' at the end. but maybe this'll be close enough. or you can tweak it more.
select name0 + ''',''' from v_r_system for xml path('') On Thu, Aug 31, 2017 at 1:10 PM, John Marcum <p...@ctglobalservices.com> wrote: > I have a list of user name and I need to get the computer names for them. > That’s easy enough but I’d like to not have to enclose all the computer > names in single quotes manually (I need to ultimately get these computers > into collections as direct memberships) Is there a way to manipulate the > results of a SQL query to do something like this. > > > > > > Let’s say I do: > > > Select Name0 > > From v_R_System > > > > I’d typically get back results like: > > > > Computer1 > > Computer2 > > Computer3 > > Computer4 > > > > Instead I want the results to be like this: > > > > ‘Computer1’,’Computer2’,’Computer3’,’Computer4’ > > > > Can this be done?? > > > > > > > > -- Thank you, Sherry Kissinger My Parameters: Standardize. Simplify. Automate Blog: http://mnscug.org/blogs/sherry-kissinger