Thanks to you both.

From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On 
Behalf Of Daniel Ratliff
Sent: Thursday, August 31, 2017 4:37 PM
To: mssms@lists.myitforum.com
Subject: RE: [mssms] List of Computers From Users

I usually throw it in Excel and do this.

PC01

'PC01',

PC02

'PC02',

PC03

'PC03',


The formula on B column is =CONCATENATE("'",A1,"',")

Daniel Ratliff

From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> 
[mailto:listsad...@lists.myitforum.com] On Behalf Of Sherry Kissinger
Sent: Thursday, August 31, 2017 3:57 PM
To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com>
Subject: Re: [mssms] List of Computers From Users

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<mailto: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


The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material. If you receive this material/information 
in error,
please contact the sender and delete or destroy the material/information.

Humana Inc. and its subsidiaries comply with applicable Federal civil rights 
laws and
do not discriminate on the basis of race, color, national origin, age, 
disability or
sex. Humana Inc. and its subsidiaries do not exclude people or treat them 
differently
because of race, color, national origin, age, disability or sex.

English: ATTENTION: If you do not speak English, language assistance services, 
free
of charge, are available to you. Call 1‐877‐320‐1235 (TTY: 711).

Español (Spanish): ATENCIÓN: Si habla español, tiene a su disposición servicios
gratuitos de asistencia lingüística. Llame al 1‐877‐320‐1235 (TTY: 711).

繁體中文(Chinese):注意:如果您使用繁體中文,您可以免費獲得語言援助
服務。請致電 1‐877‐320‐1235 (TTY: 711)。

Kreyòl Ayisyen (Haitian Creole): ATANSION: Si w pale Kreyòl Ayisyen, gen sèvis 
èd
pou lang ki disponib gratis pou ou. Rele 1‐877‐320‐1235 (TTY: 711).

Polski (Polish): UWAGA: Jeżeli mówisz po polsku, możesz skorzystać z bezpłatnej
pomocy językowej. Zadzwoń pod numer 1‐877‐320‐1235 (TTY: 711).

한국어 (Korean): 주의: 한국어를 사용하시는 경우, 언어 지원 서비스를 무료로
이용하실 수 있습니다. 1‐877‐320‐1235 (TTY: 711)번으로 전화해 주십시오.


Reply via email to