maybe this??? select
vru.ResourceID, vru.Full_User_Name0 as [Full Name] from v_R_User vru where vru.ResourceID not in (select vru.ResourceID from v_UsersPrimaryMachines upm left join v_R_User vru on upm.UserResourceID = vru.ResourceID where vru.Name0 IS NOT NULL ) From: [email protected] [mailto:[email protected]] On Behalf Of John Aubrey Sent: Thursday, October 30, 2014 1:27 PM To: '[email protected]' Subject: [mssms] RE: Users w/o assigned device query While not the exact SQL you want, it should be a good start. select Users.Name0 as "User Name", SYS.Name0 as "Machine Name" from v_UsersPrimaryMachines UPM left join v_R_User Users on UPM.UserResourceID = Users.ResourceID left join v_R_System SYS on UPM.MachineID = SYS.ResourceID >From here you have a list of all Primary Devices assigned to everyone. All >clients not in this list are ones without a primary user attached in SCCM. I >don't know how this isn't a standard report out of the box. Seems like a >pretty common report. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Beardsley, James Sent: Thursday, October 30, 2014 11:10 AM To: [email protected]<mailto:[email protected]> Subject: [mssms] Users w/o assigned device query Hello all. I'm looking to build a SQL query (or WQL) that will return all users without a primary device assigned. Any ideas? Thanks, James ________________________________ Confidentiality Notice: This e-mail is intended only for the addressee named above. It contains information that is privileged, confidential or otherwise protected from use and disclosure. If you are not the intended recipient, you are hereby notified that any review, disclosure, copying, or dissemination of this transmission, or taking of any action in reliance on its contents, or other use is strictly prohibited. If you have received this transmission in error, please reply to the sender listed above immediately and permanently delete this message from your inbox. Thank you for your cooperation. ________________________________ Confidentiality Notice: This e-mail is from a law firm and may be protected by the attorney-client or work product privileges. If you have received this message in error, please notify the sender by replying to this e-mail and then delete it from your computer. ________________________________ Confidentiality Notice: This e-mail is from a law firm and may be protected by the attorney-client or work product privileges. If you have received this message in error, please notify the sender by replying to this e-mail and then delete it from your computer.

