This post was extremely helpful and nearly gave me everything I needed! But I need to take it to the next level:
I have created some custom Profile Properties for alumni of our institution so graduates can give more details about themselves. I have no idea how to query the database to get those specific returns. I tried using the following (I changed the "31" and the "PhoneNum":
(SELECT PropertyValue FROM UserProfile WHERE
UserProfile.UserID = U.UserID AND
UserProfile.PropertyDefinitionID = 31) As PhoneNum
How can I find out the PropertyDefinitionID for a specific column in the database? Where is this detail found? I randomly tried many different numbers, and while the query worked, it didn't return a result for that column...
I need to provide our alumni coordinator with a report that provides all the users in the alumni role along with all their personal data they have entered in the custom profile fields I created...
Any help would be greatly appreciated! You guys are awesome!