Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...SQL Query for user profile properties SQL Query for user profile properties
Previous
 
Next
New Post
11/19/2008 4:41 PM
 

 

Hi

Sorry if I'm askin this in the wrong forum, this is the best I could find.

I would like to use a module called antamap to show a map with makers for the members of our site, thought that would be an easy task, NOT so.

I thought all user addresses and stuff would be in one or two tables and straight forward, but there is more to it than just a join of two tables.

I have managed to make a list of most of the "data" I would like, however I'm stuck now, I need the properties to become "fictive fields" and with the "PropertyName" as the "columnname" e.g. Street, telephone, postalcode etc. so it should kind of add some extra columns instead of having n rows.

SELECT

Users.UserID, Users.Username, Users.FirstName, Users.LastName, Users.DisplayName, UserProfile.PropertyValue, .Visibility, UserProfile.LastUpdatedDate, ProfilePropertyDefinition.PropertyCategory, .PropertyName

FROM

Users INNER JOIN

UserProfile

ON Users.UserID = UserProfile.UserID INNER JOIN

ProfilePropertyDefinition

ON UserProfile.PropertyDefinitionID = ProfilePropertyDefinition.PropertyDefinitionID

WHERE

(Users.Username = 'Pamela')

The result looks like this (sorry about the format, couldn't upload a screen dump)

UserID Username FirstName LastName DisplayName PropertyValue Visibility LastUpdatedDate PropertyCategory PropertyName

27 Pamela Pamela Anderson Pam 0 2 2007-01-01 22:49:37.783 Stamdata Medlemsnummer

27 Pamela Pamela Anderson Pam 1 2 2007-01-01 22:49:37.800 Fødselsdag Dag

27 Pamela Pamela Anderson Pam 7 2 2007-01-01 22:49:37.800 Fødselsdag Måned

27 Pamela Pamela Anderson Pam 1967 2 2007-01-01 22:49:37.800 Fødselsdag År

27 Pamela Pamela Anderson Pam Pamela 2 2007-01-01 22:49:37.800 Name FirstName

27 Pamela Pamela Anderson Pam Anderson 2 2007-01-01 22:49:37.800 Name LastName

27 Pamela Pamela Anderson Pam 60 2 2007-01-01 22:49:37.800 Preferences TimeZone

27 Pamela Pamela Anderson Pam da-DK 2 2007-01-01 22:49:37.800 Preferences PreferredLocale

27 Pamela Pamela Anderson Pam Hollywood Boulevard 2 2007-01-01 23:18:02.610 Address Street

27 Pamela Pamela Anderson Pam 5800 2 2007-11-29 22:37:12.557 Address PostalCode

27 Pamela Pamela Anderson Pam Los Angeles 2 2007-01-01 23:18:02.610 Address City

27 Pamela Pamela Anderson Pam Denmark 2 2007-01-01 23:18:02.610 Address Country

(12 row(s) affected)

 

 It is made by the query designer in SQL management studio, and I'm a newbie to this,

 

 

 

UserProfile

ProfilePropertyDefinition

 
New Post
4/23/2009 10:21 AM
 
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...SQL Query for user profile properties SQL Query for user profile properties


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out