Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  Help needed to reverse this report
Previous Previous
 
Next Next
New Post 3/3/2007 7:32 AM
User is offline thkerkmann
16 posts
10th Ranked


Help needed to reverse this report 
Hi all,

I have made a SQL statement to list users in a specific role:

SELECT us.UserName as 'User',r.RoleName as 'Role'
FROM Roles r
INNER JOIN UserRoles ur ON r.RoleID = ur.RoleID
INNER JOIN Users us on ur.UserId = us.UserId
WHERE r.RoleName = 'SpecificRole'
ORDER BY UserName;

I now want the reverse thing - users that are not member of a specific role. Can anyone help me please, I'm not an SQL guru. Thanks in advance.
 
New Post 3/3/2007 8:17 AM
User is offline Sebastian Leupold
15198 posts
www.deutschnetnuke.de
1st Ranked












Re: Help needed to reverse this report 
SELECT us.UserName as 'User',r.RoleName as 'Role'
FROM Users
WHERE UserID Not IN 
(SELECT ur.UserID 
FROM Roles r INNER JOIN UserRoles ur ON r.RoleID = ur.RoleID 
WHERE r.RoleName = 'SpecificRole')
ORDER BY UserName;

Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Reports Module ...  Help needed to reverse this report
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DM Analytics, LLC
DM Analytics, LLC provides software solutions that facilitate rapid development of independent or dependent datamarts and their associated web-based reporting.
www.dmanalytics.com
Integral Hosting | DNN only $14.95/month
Experienced .NET hosting on Windows 2003, ASP.NET 1.1 & 2.0, MSSQL with real technical support.
www.integralhosting.com
Aricie
Aricie is one of the French pioneers and experts in DotNetNuke technology.
www.aricie.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP