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  |  

DotNetNuke Marketplace
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
 


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
15215 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.

 


Verndale - Web Development, Support, Hosting
Since 1998, Verndale has helped hundreds of emerging and midsize businesses maximize the value and reach of their web assets with a comprehensive offering of strategy, design, development, search marketing and support services.
www.verndale.com
Overlook Technology
Website Development, DotNetNuke Consulting, Module Development, Portal Management
OverlookTechnology.com
DeutschNetNuke = DotNetNuke in German
DeutschNetNuke provides all DotNetNuke related services in German (and English).
www.DeutschNetNuke.de

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