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 ...how do you JOIN the "users" table to the "aspnet_users" table?how do you JOIN the "users" table to the "aspnet_users" table?
Previous
 
Next
New Post
6/12/2008 12:04 AM
 

Hello,

I'd like to get the LastActivityDate for each user in the Users table.  The aspnet_users table has its userid written in some kind of encoded format... for example 72f5ba7d-62cb-478c-99d5-7c137e4e5668... how do I join the two tables?  I could use the username in each table, but I think that is probably inefficient.  Any better way?

 

Thanks,

Mike

 

 
New Post
6/12/2008 5:11 AM
 

I'd do it based on usernames

select Users.Username, aspnet_users.username, aspnet_users.lastactivitydate from Users
inner join aspnet_users ON Users.Username = aspnet_users.username

 
New Post
6/12/2008 1:04 PM
 

Baatezu wrote

I'd do it based on usernames

select Users.Username, aspnet_users.username, aspnet_users.lastactivitydate from Users
inner join aspnet_users ON Users.Username = aspnet_users.username

is that as efficient as joining on a number?

 
New Post
6/12/2008 1:10 PM
 

No, it's not as efficient, but it's the best you're going to be able to do here.

Also remember that if your query is executed over a DNN installation that is not using the AspNetSqlMembershipProvider, this query will break.  If it's for your own internal enjoyment, then there will probably be no problem.

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
6/12/2008 5:30 PM
 

I just did that in my SQL Server manager, I don't run that from any code; So I didn't know about any limitations running from code.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...how do you JOIN the "users" table to the "aspnet_users" table?how do you JOIN the "users" table to the "aspnet_users" table?


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