<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Adammer &#045; Blog &#187; SQL</title>
	<atom:link href="http://www.adammer.com/blog/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adammer.com/blog</link>
	<description>Official Adammer Blog</description>
	<lastBuildDate>Mon, 19 Dec 2011 23:54:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SQL code lists email addresses of all members of DNN security role by name</title>
		<link>http://www.adammer.com/blog/2009/06/sql-code-lists-email-addresses-of-all-members-of-dnn-security-role-by-name/</link>
		<comments>http://www.adammer.com/blog/2009/06/sql-code-lists-email-addresses-of-all-members-of-dnn-security-role-by-name/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 22:44:20 +0000</pubDate>
		<dc:creator>Adam Humphrey</dc:creator>
				<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[DNN Tips]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.adammer.com/blog/?p=65</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.adammer.com/blog/2009/06/sql-code-lists-email-addresses-of-all-members-of-dnn-security-role-by-name/' addthis:title='SQL code lists email addresses of all members of DNN security role by name' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_email"></a><a class="addthis_button_print"></a><a class="addthis_button_google"></a><a class="addthis_button_linkedin"></a><a class="addthis_button_evernote"></a><a class="addthis_button_favorites"></a><a class="addthis_button_compact"></a></div>This is a very simple (and portable) SQL statement that will list the email addresses of all members of a DNN security role by the security role name. This is useful if you use 3rd party newsletter or email listserv software and need the email addresses of all members of a DNN security role. SELECT [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.adammer.com/blog/2009/06/sql-code-lists-email-addresses-of-all-members-of-dnn-security-role-by-name/' addthis:title='SQL code lists email addresses of all members of DNN security role by name ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://www.adammer.com/blog/2009/06/sql-code-lists-email-addresses-of-all-members-of-dnn-security-role-by-name/' addthis:title='SQL code lists email addresses of all members of DNN security role by name' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_email"></a><a class="addthis_button_print"></a><a class="addthis_button_google"></a><a class="addthis_button_linkedin"></a><a class="addthis_button_evernote"></a><a class="addthis_button_favorites"></a><a class="addthis_button_compact"></a></div><p>This is a very simple (and portable) SQL statement that will list the email addresses of all members of a DNN security role by the security role name.</p>
<p>This is useful if you use 3rd party newsletter or email listserv software and need the email addresses of all members of a DNN security role.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> u<span style="color: #66cc66;">.</span>Email <span style="color: #993333; font-weight: bold;">FROM</span> Users u<span style="color: #66cc66;">,</span> UserRoles ur<span style="color: #66cc66;">,</span> Roles r
<span style="color: #993333; font-weight: bold;">WHERE</span> r<span style="color: #66cc66;">.</span>RoleID <span style="color: #66cc66;">=</span> ur<span style="color: #66cc66;">.</span>RoleID <span style="color: #993333; font-weight: bold;">AND</span>
ur<span style="color: #66cc66;">.</span>UserID <span style="color: #66cc66;">=</span> u<span style="color: #66cc66;">.</span>UserID <span style="color: #993333; font-weight: bold;">AND</span>
r<span style="color: #66cc66;">.</span>RoleName <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'Registered Users'</span></pre></div></div>

<p>You can replace <code>'Registered Users'</code> with any Security Role name.</p>
<p>This can be executed from the Host>SQL page or using the Microsoft SQL Server Management Studio.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.adammer.com/blog/2009/06/sql-code-lists-email-addresses-of-all-members-of-dnn-security-role-by-name/' addthis:title='SQL code lists email addresses of all members of DNN security role by name ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.adammer.com/blog/2009/06/sql-code-lists-email-addresses-of-all-members-of-dnn-security-role-by-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

