I wrote a stored procedure to do that, it was the easiest way for me. I can get that and post if wish.
Rick J. Jones Wireless from AT&T Domestic Desktop Application Management D: (425) 288-6240 C: (206) 419-1104 ________________________________ From: Krueger, Jeff<mailto:jkrue...@hfhs.org> Sent: 4/22/2014 8:26 AM To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com> Subject: [mssms] Get the SYSTEM_OU_NAME without the duplicate rows Does anyone have any SQL Fu handy that will give you the longest value in the dbo.v_RA_System_SystemOUName? Trying to put together a report where I want to add the OU a system is in but that view has separate rows for each sub ou a given system is in. Jeff Krueger IT - Endpoint Design Services Henry Ford Health System jkrue...@hfhs.org<mailto:jkrue...@hfhs.org> 248.853.4466 ________________________________ CONFIDENTIALITY NOTICE: This email contains information from the sender that may be CONFIDENTIAL, LEGALLY PRIVILEGED, PROPRIETARY or otherwise protected from disclosure. This email is intended for use only by the person or entity to whom it is addressed. If you are not the intended recipient, any use, disclosure, copying, distribution, printing, or any action taken in reliance on the contents of this email, is strictly prohibited. If you received this email in error, please contact the sending party by reply email, delete the email from your computer system and shred any paper copies. Note to Patients: There are a number of risks you should consider before using e-mail to communicate with us. See our Privacy & Security page on www.henryford.com for more detailed information as well as information concerning MyChart, our new patient portal. If you do not believe that our policy gives you the privacy and security protection you need, do not send e-mail or Internet communications to us.