How tdo I get managers full name using BDC XML<p>I can get every thing I need except I cannot figure out how to get the managers full name, I can get the managers domain\name, but cannot get the full name to work.<br/><br/>I am using this as a base line for the SQL query for the XML:   (The data is contained in two tables, the first is the UserProfile_Full table, which contains the Basic Profile Information. The second is the UserProfileValue table. The two are linked by the RecordID Field)<br/><br/>select a.Employee,  o.[Last Name],n.[First Name],  a.[Office Phone], d.[Cell Phone], c.Email, h.Location, e.Department, b.Title, g.FAX<br/>from<br/>(select<br/>a.RecordID,<br/>a.PreferredName as Employee,<br/>b.PropertyVal as [Office Phone]<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=8 and<br/>a.RecordID=b.RecordID) a</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as Title<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=13 and<br/>a.RecordID=b.RecordID) b<br/>on a.RecordID=b.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as Email<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=9 and<br/>a.RecordID=b.RecordID) c<br/>on a.RecordID=c.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as [Cell Phone]<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=19 and<br/>a.RecordID=b.RecordID) d<br/>on a.RecordID=d.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as Department<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=14 and<br/>a.RecordID=b.RecordID) e<br/>on a.RecordID=e.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as FAX<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=20 and<br/>a.RecordID=b.RecordID) g<br/>on a.RecordID=g.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as Location<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=11 and<br/>a.RecordID=b.RecordID) h<br/>on a.RecordID=h.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as [First Name]<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=4 and<br/>a.RecordID=b.RecordID) n<br/>on a.RecordID=n.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as [Last Name]<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=5 and<br/>a.RecordID=b.RecordID) o<br/>on a.RecordID=o.RecordID</p> <p><br/>where<br/>a.Employee like @employeelast + '%'<br/>and cast(n.[First Name] as nvarchar(100)) like @employeeFirst + '%'<br/>and CAST(h.location as nvarchar(100)) like @location + '%'<br/>and cast(e.Department as nvarchar(100)) like @department + '%'<br/>and cast(b.Title as nvarchar(100)) like @Title + '%'<br/>and c.email != ''</p> <p>order by<br/>o.[Last Name], n.[First Name]<br/><br/></p>© 2009 Microsoft Corporation. All rights reserved.Thu, 02 Jul 2009 14:09:33 Z621cf1a6-c0c6-4cef-be2e-7c605ef7d242http://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/621cf1a6-c0c6-4cef-be2e-7c605ef7d242#621cf1a6-c0c6-4cef-be2e-7c605ef7d242http://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/621cf1a6-c0c6-4cef-be2e-7c605ef7d242#621cf1a6-c0c6-4cef-be2e-7c605ef7d242GGrattohttp://social.msdn.microsoft.com/Profile/en-US/?user=GGrattoHow tdo I get managers full name using BDC XML<p>I can get every thing I need except I cannot figure out how to get the managers full name, I can get the managers domain\name, but cannot get the full name to work.<br/><br/>I am using this as a base line for the SQL query for the XML:   (The data is contained in two tables, the first is the UserProfile_Full table, which contains the Basic Profile Information. The second is the UserProfileValue table. The two are linked by the RecordID Field)<br/><br/>select a.Employee,  o.[Last Name],n.[First Name],  a.[Office Phone], d.[Cell Phone], c.Email, h.Location, e.Department, b.Title, g.FAX<br/>from<br/>(select<br/>a.RecordID,<br/>a.PreferredName as Employee,<br/>b.PropertyVal as [Office Phone]<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=8 and<br/>a.RecordID=b.RecordID) a</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as Title<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=13 and<br/>a.RecordID=b.RecordID) b<br/>on a.RecordID=b.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as Email<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=9 and<br/>a.RecordID=b.RecordID) c<br/>on a.RecordID=c.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as [Cell Phone]<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=19 and<br/>a.RecordID=b.RecordID) d<br/>on a.RecordID=d.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as Department<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=14 and<br/>a.RecordID=b.RecordID) e<br/>on a.RecordID=e.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as FAX<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=20 and<br/>a.RecordID=b.RecordID) g<br/>on a.RecordID=g.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as Location<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=11 and<br/>a.RecordID=b.RecordID) h<br/>on a.RecordID=h.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as [First Name]<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=4 and<br/>a.RecordID=b.RecordID) n<br/>on a.RecordID=n.RecordID</p> <p>left outer join<br/>(select<br/>a.RecordID,<br/>b.PropertyVal as [Last Name]<br/>from<br/>UserProfile_Full a, UserProfileValue b<br/>where<br/>b.PropertyID=5 and<br/>a.RecordID=b.RecordID) o<br/>on a.RecordID=o.RecordID</p> <p><br/>where<br/>a.Employee like @employeelast + '%'<br/>and cast(n.[First Name] as nvarchar(100)) like @employeeFirst + '%'<br/>and CAST(h.location as nvarchar(100)) like @location + '%'<br/>and cast(e.Department as nvarchar(100)) like @department + '%'<br/>and cast(b.Title as nvarchar(100)) like @Title + '%'<br/>and c.email != ''</p> <p>order by<br/>o.[Last Name], n.[First Name]<br/><br/></p>Thu, 02 Jul 2009 14:09:33 Z2009-07-02T14:09:33Z