The query will get you stated.

Select
       U.Full_User_Name0,
       Case
             When isnull(U.Mail0, 'n/a') = 'n/a' then 'n/a'
             when U.Mail0 = '' then 'n/a'
             else
             U.Mail0
       End as 'Email'
from
       dbo.v_R_User U


Take this query and build upon it, if you get stuck post what you have here 
with a short description of the problem you are having.



Garth Jones
Chief Architect

www.Enhansoft.com<http://www.enhansoft.com/>
[Description: Description: 
cid:[email protected]]<http://www.enhansoft.com/>
Enhancing Your Business
[Description: Description: Description: Description: Description: Description: 
Description: 
cid:[email protected]]<http://www.enhansoft.com/blog>[Description: 
Description: Description: Description: Description: Description: Description: 
cid:[email protected]]<https://twitter.com/enhansoft>[Description: 
Description: Description: Description: Description: Description: Description: 
cid:[email protected]]<http://www.facebook.com/EnhansoftInc>[Description:
 Description: Description: Description: Description: Description: Description: 
Description: Description: Description: Description: Description: Description: 
Description: Description: Enhansoft's YouTube 
Page]<http://www.youtube.com/user/Enhansoft/videos>[Description: Description: 
Description: Description: Description: Description: Description: 
cid:[email protected]]<http://myitforum.com/myitforumwp/community/groups/enhansoft/>

Subscribe to Enhansoft's Newsletter!<http://www.enhansoft.com/register>

From: [email protected] [mailto:[email protected]] On 
Behalf Of Enley, Carl
Sent: Wednesday, May 24, 2017 8:00 AM
To: [email protected]
Subject: [mssms] Query assistance

I need help writing a query that will allow me to pull the primary user and the 
mail0 attribute for each machine in a collection. I need to communicate with a 
group of users about an anticipated software update and it would be great if I 
could add all of the machines to a collection run a query against it to pull 
the email address for the primary device user. I could then just export the 
results and copy the email address into Outlook for the communication.

I do have the email address being discovered and UDA turned on and working, CM 
1702 if it matters.

Thanks





Reply via email to