Because I didn't think of that. :-(



________________________________
John Marcum
Sr. Desktop Architect
Bradley Arant Boult Cummings LLP
________________________________

From: [email protected] [mailto:[email protected]] On 
Behalf Of Daniel Ratliff
Sent: Monday, October 07, 2013 1:27 PM
To: [email protected]
Subject: [mssms] RE: OT: SQL Trim

Why not cross reference to the user_name0 column? It's just the username and 
nothing else.

Daniel Ratliff

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
 On Behalf Of Marcum, John
Sent: Monday, October 07, 2013 2:21 PM
To: SMS List ([email protected]<mailto:[email protected]>)
Subject: [mssms] OT: SQL Trim

I always struggle with this... How to trim the domain\ off of of the user name 
here?


select
vrs.Name0 as [Machine Name] ,
vru.Unique_User_Name0 as [User Name],
vru.cn0 as [Full Name]

from v_UsersPrimaryMachines upm
left join v_R_User vru on upm.UserResourceID = vru.ResourceID
left join v_R_System vrs on upm.MachineID = vrs.ResourceID
where vru.Name0 IS NOT NULL
order by vru.Name0







________________________________
John Marcum
Sr. Desktop Architect
Bradley Arant Boult Cummings LLP
________________________________


________________________________

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.


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.

________________________________

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.


Reply via email to