<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Rich "The Hubbins" Claussen - SQL</title>
    <link>http://richhubbins.theclaussens.com/</link>
    <description>Rich Claussen's Weblog</description>
    <language>en-us</language>
    <copyright>Rich Claussen</copyright>
    <lastBuildDate>Wed, 03 Jun 2009 16:03:59 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.7174.0</generator>
    <managingEditor>weblog@theclaussens.com</managingEditor>
    <webMaster>weblog@theclaussens.com</webMaster>
    <item>
      <trackback:ping>http://richhubbins.theclaussens.com/Trackback.aspx?guid=410fedf8-906d-4e31-8173-19997a4653e6</trackback:ping>
      <pingback:server>http://richhubbins.theclaussens.com/pingback.aspx</pingback:server>
      <pingback:target>http://richhubbins.theclaussens.com/PermaLink,guid,410fedf8-906d-4e31-8173-19997a4653e6.aspx</pingback:target>
      <dc:creator>Rich Claussen</dc:creator>
      <wfw:comment>http://richhubbins.theclaussens.com/CommentView,guid,410fedf8-906d-4e31-8173-19997a4653e6.aspx</wfw:comment>
      <wfw:commentRss>http://richhubbins.theclaussens.com/SyndicationService.asmx/GetEntryCommentsRss?guid=410fedf8-906d-4e31-8173-19997a4653e6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>What is SQLSaturday?</strong>
        </p>
        <p>
It's a free one day learning event for SQL Server professionals, loosely patterned
on the well known Code Camp model, organized by the Portland SQL Server Users Group
(pdxSSug). 
</p>
        <p>
          <strong>Date and Location:</strong>
        </p>
        <p>
SQL Saturday Portland will be held June 6, 2009 at Mt. Hood Community College, 26000
S.E. Stark St., Gresham, Oregon 97030. The event follows the standard conference model.
There are 12 sessions across 2 tracks. Most of the sessions will run 60 minutes. Check
in will open at 8:00 am and sessions begin at 9:00 am. Lunch will be provided on site,
and the day will close out around 5:00 pm. The after event will be held at <a href="http://www.mcmenamins.com/index.php">McMenamins
Edgefield</a>, 2126 S.W. Halsey St., Troutdale, OR 97060 beginning right after the
last session. Registration is at <a href="http://www.sqlsaturday.com">http://www.sqlsaturday.com</a></p>
        <p>
          <strong>When will the schedule of sessions be posted?</strong>
        </p>
        <p>
The call for speakers is closed, and the schedule is finalized. 
</p>
        <p>
          <strong>Can I sponsor this event?</strong>
        </p>
        <p>
More sponsors are needed to help subsidize the incidental costs of running the event
and this is a great event to meet SQL Server professionals or to just give back to
the community. If you are interested or want more information, please visit the <a href="http://www.sqlsaturday.com/sponsors.aspx">sponsor</a> page.
You can view all of the great sponsors there and it is hoped that most of them will
be at the event. 
</p>
        <p>
          <strong>What else can you tell me about the event?</strong>
        </p>
        <p>
This event is free to anyone that wishes to attend. Check in for the event opens at
8 am. 
</p>
        <p>
          <strong>Be sure to register at <a href="http://www.sqlsaturday.com">http://www.sqlsaturday.com</a></strong>
        </p>
      </body>
      <title>SQLSaturday #12 Portland 2009</title>
      <guid isPermaLink="false">http://richhubbins.theclaussens.com/PermaLink,guid,410fedf8-906d-4e31-8173-19997a4653e6.aspx</guid>
      <link>http://richhubbins.theclaussens.com/2009/06/03/SQLSaturday12Portland2009.aspx</link>
      <pubDate>Wed, 03 Jun 2009 16:03:59 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;What is SQLSaturday?&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
It's a free one day learning event for SQL Server professionals, loosely patterned
on the well known Code Camp model, organized by the Portland SQL Server Users Group
(pdxSSug). 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Date and Location:&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
SQL Saturday Portland will be held June 6, 2009 at Mt. Hood Community College, 26000
S.E. Stark St., Gresham, Oregon 97030. The event follows the standard conference model.
There are 12 sessions across 2 tracks. Most of the sessions will run 60 minutes. Check
in will open at 8:00 am and sessions begin at 9:00 am. Lunch will be provided on site,
and the day will close out around 5:00 pm. The after event will be held at &lt;a href="http://www.mcmenamins.com/index.php"&gt;McMenamins
Edgefield&lt;/a&gt;, 2126 S.W. Halsey St., Troutdale, OR 97060 beginning right after the
last session. Registration is at &lt;a href="http://www.sqlsaturday.com"&gt;http://www.sqlsaturday.com&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;When will the schedule of sessions be posted?&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
The call for speakers is closed, and the schedule is finalized. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Can I sponsor this event?&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
More sponsors are needed to help subsidize the incidental costs of running the event
and this is a great event to meet SQL Server professionals or to just give back to
the community. If you are interested or want more information, please visit the &lt;a href="http://www.sqlsaturday.com/sponsors.aspx"&gt;sponsor&lt;/a&gt; page.
You can view all of the great sponsors there and it is hoped that most of them will
be at the event. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;What else can you tell me about the event?&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
This event is free to anyone that wishes to attend. Check in for the event opens at
8 am. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Be sure to register at &lt;a href="http://www.sqlsaturday.com"&gt;http://www.sqlsaturday.com&lt;/a&gt; &lt;/strong&gt;
&lt;/p&gt;</description>
      <comments>http://richhubbins.theclaussens.com/CommentView,guid,410fedf8-906d-4e31-8173-19997a4653e6.aspx</comments>
      <category>PADNUG</category>
      <category>SQL</category>
      <category>Technology</category>
    </item>
    <item>
      <trackback:ping>http://richhubbins.theclaussens.com/Trackback.aspx?guid=b0297fe3-e602-4b14-95e0-65ac0f4d0a83</trackback:ping>
      <pingback:server>http://richhubbins.theclaussens.com/pingback.aspx</pingback:server>
      <pingback:target>http://richhubbins.theclaussens.com/PermaLink,guid,b0297fe3-e602-4b14-95e0-65ac0f4d0a83.aspx</pingback:target>
      <dc:creator>Rich Claussen</dc:creator>
      <wfw:comment>http://richhubbins.theclaussens.com/CommentView,guid,b0297fe3-e602-4b14-95e0-65ac0f4d0a83.aspx</wfw:comment>
      <wfw:commentRss>http://richhubbins.theclaussens.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b0297fe3-e602-4b14-95e0-65ac0f4d0a83</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The Code Trip is near its end at the MVP summit. Join us Thursday at the Corillian
Cafe to cheer the team on through the final leg of their journey.
</p>
        <table>
          <tbody>
            <tr>
              <td valign="top" align="right" width="60">
                <b>WHAT:</b>
              </td>
              <td width="476">
                <strong>June PADNUG SQL SIG Meeting</strong>
              </td>
            </tr>
            <tr>
              <td valign="top" align="right" width="60">
                <b>WHEN:</b>
              </td>
              <td width="476">
                <b>
                  <a href="http://theclaussens.com/CalendarLinks/PADNUGSQL200806.vcs">Tuesday 06/17/2008</a>
                </b>
                <br />
6:30 p.m. Presentation<br />
~8:30 p.m. After Words at Cornelius Pass Roadhouse?</td>
            </tr>
            <tr>
              <td valign="top" align="right" width="60">
                <b>WHERE:</b>
              </td>
              <td width="476">
                <b>
                  <strong>
                    <a href="http://shrinkster.com/mjf">Corillian Cafe, now part of CheckFree,
now a part of FiServ</a>
                  </strong>
                  <br />
                </b>3400 NW John Olsen Place<br />
Hillsboro, OR 97124</td>
            </tr>
            <tr>
              <td valign="top" align="right" width="60">
                <b>WHO:</b>
              </td>
              <td width="476">
                <p>
                  <strong>William R. Vaughn<br /></strong>Bill retired from Microsoft (in 2000) after 14 years to focus on mentoring,
speaking, and writing. His specialty is data access application design especially
when connecting to SQL Server. Bill has worked in the computer industry since 1972.
He holds a Bachelor's degree in Computer Science from Mary Hardin-Baylor and a Master's
degree in Interdisciplinary Studies from the University of Texas. He's also been awarded
an Honorary PhD. from the University of Advancing Computer Technology in Tempe Arizona.
Bill spent his early years working in the mainframe data processing industry and transitioned
to the personal computer side in the late 70s. Along the way, he worked for the Texas
DPS Narcotics Service, EDS (where he was recruited by and worked for Ross Perot),
at Mostek/United Technologies, Challenge Systems, Digital Research, and CPT Corporation.
After having surfed the PC industry for many years, he began his Microsoft years in
1986 working for the Windows developer liaison team at Microsoft in 1986. For the
next 14 years, he worked in various divisions at Microsoft including Microsoft University,
the Visual Basic documentation and Visual Studio marketing and Internal Technical
Education teams before retiring in 2000 to form his own company, Beta V Corporation. 
</p>
                <p>
Bill has written seven editions of the popular Hitchhiker's Guide (the 4th, 5th and
6th published by Microsoft Press) and books for APress, including the bestseller ADO
and ADO.NET Examples and Best Practices. Peter Blackburn and Bill also coauthored
the Hitchhiker's Guide to SQL Server 2000 Reporting Services (Addison- Wesley). His
latest work is Hitchhiker's Guide to SQL Server Everywhere-his first e-Book. He writes
lead articles for SQL Server Magazine where he is a contributing editor, MSDN, and
others. Bill also writes a bi-weekly editorial for Processor.COM magazine. Bill is
a top-rated speaker at conferences worldwide, including keynotes and sessions at TechEd,
DevWeek, Dev Connections, SQL Connections, VBUG, and many others - where his wit and
no-holds-barred technical insights win him rave reviews. Bill is a Microsoft MVP.
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" align="right" width="60">
                <b>TOPIC:</b>
              </td>
              <td width="476">
                <p>
                  <strong>Visual Studio Reporting</strong>
                  <br />
The inside scoop on how to get the most out of the new ReportViewer control and how
it's evolved in Visual Studio 2008. This discusses how to leverage your Reporting
Services skills and RDL reports to create application-based reports and how to manage
the myriad of issues that come up when trying to emulate Reporting Services functionality
like parameters, connections, pick-list population and much more. This session previews
the SQL Server Reporting Services technology coming with SQL Server 2008.
</p>
              </td>
            </tr>
          </tbody>
        </table>
        <p>
While you are at it, consider visiting our Premium Sponsors that make these meetings
possible: 
</p>
        <blockquote>
          <p>
            <a href="http://www.aivea.com/">
              <strong>Aivea</strong>
            </a> - <a href="http://www.aivea.com/">http://www.aivea.com/</a><br /><a href="http://www.ascentium.com/"><strong>Ascentium</strong></a> - <a href="http://www.ascentium.com/">http://www.ascentium.com/</a><br /><a href="http://www.microsoft.com/"><strong>Microsoft</strong></a> - <a href="http://www.microsoft.com/">http://www.microsoft.com/</a><br /><a href="http://www.oreilly.com/"><strong>O'Reilly</strong></a> - <a href="http://www.oreilly.com/">http://www.oreilly.com/</a><br /><a href="http://www.roberthalftechnology.com/"><strong>Robert Half Technology</strong></a> - <a href="http://www.roberthalftechnology.com/">http://www.roberthalftechnology.com/</a><br /><strong><a href="http://submain.com/codeit.right">SubMain and CodeIt.Right</a> - </strong><a title="http://submain.com/" href="http://submain.com/codeit.right">http://submain.com/codeit.right</a><br /><strong><a href="http://www.jetbrains.com/resharper/">JetBrains</a> - </strong><a title="http://www.jetbrains.com/resharper/" href="http://www.jetbrains.com/resharper/">http://www.jetbrains.com/resharper/</a></p>
        </blockquote>
        <p>
Looking forward to seeing you all there!
</p>
      </body>
      <title>June SQL SIG Meeting - Visual Studio Reporting</title>
      <guid isPermaLink="false">http://richhubbins.theclaussens.com/PermaLink,guid,b0297fe3-e602-4b14-95e0-65ac0f4d0a83.aspx</guid>
      <link>http://richhubbins.theclaussens.com/2008/06/13/JuneSQLSIGMeetingVisualStudioReporting.aspx</link>
      <pubDate>Fri, 13 Jun 2008 22:27:56 GMT</pubDate>
      <description>&lt;p&gt;
The Code Trip is near its end at the MVP summit. Join us Thursday at the Corillian
Cafe to cheer the team on through the final leg of their journey.
&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign=top align=right width=60&gt;
&lt;b&gt;WHAT:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width=476&gt;
&lt;strong&gt;June PADNUG SQL SIG Meeting&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top align=right width=60&gt;
&lt;b&gt;WHEN:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width=476&gt;
&lt;b&gt;&lt;a href="http://theclaussens.com/CalendarLinks/PADNUGSQL200806.vcs"&gt;Tuesday 06/17/2008&lt;/a&gt; &lt;/b&gt;
&lt;br&gt;
6:30 p.m. Presentation&lt;br&gt;
~8:30 p.m. After Words at Cornelius Pass Roadhouse?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top align=right width=60&gt;
&lt;b&gt;WHERE:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width=476&gt;
&lt;b&gt;&lt;strong&gt;&lt;a href="http://shrinkster.com/mjf"&gt;Corillian Cafe, now part of CheckFree,
now a part of FiServ&lt;/a&gt;&lt;/strong&gt;
&lt;br&gt;
&lt;/b&gt;3400 NW John Olsen Place&lt;br&gt;
Hillsboro, OR 97124&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top align=right width=60&gt;
&lt;b&gt;WHO:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width=476&gt;
&lt;p&gt;
&lt;strong&gt;William R. Vaughn&lt;br&gt;
&lt;/strong&gt;Bill retired from Microsoft (in 2000) after 14 years to focus on mentoring,
speaking, and writing. His specialty is data access application design especially
when connecting to SQL Server. Bill has worked in the computer industry since 1972.
He holds a Bachelor's degree in Computer Science from Mary Hardin-Baylor and a Master's
degree in Interdisciplinary Studies from the University of Texas. He's also been awarded
an Honorary PhD. from the University of Advancing Computer Technology in Tempe Arizona.
Bill spent his early years working in the mainframe data processing industry and transitioned
to the personal computer side in the late 70s. Along the way, he worked for the Texas
DPS Narcotics Service, EDS (where he was recruited by and worked for Ross Perot),
at Mostek/United Technologies, Challenge Systems, Digital Research, and CPT Corporation.
After having surfed the PC industry for many years, he began his Microsoft years in
1986 working for the Windows developer liaison team at Microsoft in 1986. For the
next 14 years, he worked in various divisions at Microsoft including Microsoft University,
the Visual Basic documentation and Visual Studio marketing and Internal Technical
Education teams before retiring in 2000 to form his own company, Beta V Corporation. 
&lt;/p&gt;
&lt;p&gt;
Bill has written seven editions of the popular Hitchhiker's Guide (the 4th, 5th and
6th published by Microsoft Press) and books for APress, including the bestseller ADO
and ADO.NET Examples and Best Practices. Peter Blackburn and Bill also coauthored
the Hitchhiker's Guide to SQL Server 2000 Reporting Services (Addison- Wesley). His
latest work is Hitchhiker's Guide to SQL Server Everywhere-his first e-Book. He writes
lead articles for SQL Server Magazine where he is a contributing editor, MSDN, and
others. Bill also writes a bi-weekly editorial for Processor.COM magazine. Bill is
a top-rated speaker at conferences worldwide, including keynotes and sessions at TechEd,
DevWeek, Dev Connections, SQL Connections, VBUG, and many others - where his wit and
no-holds-barred technical insights win him rave reviews. Bill is a Microsoft MVP.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top align=right width=60&gt;
&lt;b&gt;TOPIC:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width=476&gt;
&lt;p&gt;
&lt;strong&gt;Visual Studio Reporting&lt;/strong&gt;
&lt;br&gt;
The inside scoop on how to get the most out of the new ReportViewer control and how
it's evolved in Visual Studio 2008. This discusses how to leverage your Reporting
Services skills and RDL reports to create application-based reports and how to manage
the myriad of issues that come up when trying to emulate Reporting Services functionality
like parameters, connections, pick-list population and much more. This session previews
the SQL Server Reporting Services technology coming with SQL Server 2008.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
While you are at it, consider visiting our Premium Sponsors that make these meetings
possible: 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="http://www.aivea.com/"&gt;&lt;strong&gt;Aivea&lt;/strong&gt;&lt;/a&gt; - &lt;a href="http://www.aivea.com/"&gt;http://www.aivea.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.ascentium.com/"&gt;&lt;strong&gt;Ascentium&lt;/strong&gt;&lt;/a&gt; - &lt;a href="http://www.ascentium.com/"&gt;http://www.ascentium.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.microsoft.com/"&gt;&lt;strong&gt;Microsoft&lt;/strong&gt;&lt;/a&gt; - &lt;a href="http://www.microsoft.com/"&gt;http://www.microsoft.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.oreilly.com/"&gt;&lt;strong&gt;O'Reilly&lt;/strong&gt;&lt;/a&gt; - &lt;a href="http://www.oreilly.com/"&gt;http://www.oreilly.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.roberthalftechnology.com/"&gt;&lt;strong&gt;Robert Half Technology&lt;/strong&gt;&lt;/a&gt; - &lt;a href="http://www.roberthalftechnology.com/"&gt;http://www.roberthalftechnology.com/&lt;/a&gt; 
&lt;br&gt;
&lt;strong&gt;&lt;a href="http://submain.com/codeit.right"&gt;SubMain and CodeIt.Right&lt;/a&gt; - &lt;/strong&gt;&lt;a title=http://submain.com/ href="http://submain.com/codeit.right"&gt;http://submain.com/codeit.right&lt;/a&gt;
&lt;br&gt;
&lt;strong&gt;&lt;a href="http://www.jetbrains.com/resharper/"&gt;JetBrains&lt;/a&gt; - &lt;/strong&gt;&lt;a title=http://www.jetbrains.com/resharper/ href="http://www.jetbrains.com/resharper/"&gt;http://www.jetbrains.com/resharper/&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Looking forward to seeing you all there!
&lt;/p&gt;</description>
      <comments>http://richhubbins.theclaussens.com/CommentView,guid,b0297fe3-e602-4b14-95e0-65ac0f4d0a83.aspx</comments>
      <category>.NET</category>
      <category>Developer</category>
      <category>PADNUG</category>
      <category>SQL</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://richhubbins.theclaussens.com/Trackback.aspx?guid=a007e5fa-1f1a-4194-8128-51d8f3898cd3</trackback:ping>
      <pingback:server>http://richhubbins.theclaussens.com/pingback.aspx</pingback:server>
      <pingback:target>http://richhubbins.theclaussens.com/PermaLink,guid,a007e5fa-1f1a-4194-8128-51d8f3898cd3.aspx</pingback:target>
      <dc:creator>Rich Claussen</dc:creator>
      <wfw:comment>http://richhubbins.theclaussens.com/CommentView,guid,a007e5fa-1f1a-4194-8128-51d8f3898cd3.aspx</wfw:comment>
      <wfw:commentRss>http://richhubbins.theclaussens.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a007e5fa-1f1a-4194-8128-51d8f3898cd3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The Code Trip is near its end at the MVP summit. Join us Thursday at the Corillian
Cafe to cheer the team on through the final leg of their journey.
</p>
        <table>
          <tbody>
            <tr>
              <td valign="top" width="60" align="right">
                <b>WHAT:</b>
              </td>
              <td width="476">
                <strong>April PADNUG Meeting</strong>
              </td>
            </tr>
            <tr>
              <td valign="top" width="60" align="right">
                <b>WHEN:</b>
              </td>
              <td width="476">
                <b>
                  <a href="http://theclaussens.com/CalendarLinks/PADNUG200804.vcs">Thursday 04/10/2008</a>
                </b>
                <br />
6:00 p.m. Pizza (by <a href="http://www.ascentium.com/">Ascentium</a>)<br />
6:30 p.m. Presentation<br />
~9:00 p.m. After Words at Cornelius Pass Roadhouse</td>
            </tr>
            <tr>
              <td valign="top" width="60" align="right">
                <b>WHERE:</b>
              </td>
              <td width="476">
                <b>
                  <strong>
                    <a href="http://shrinkster.com/mjf">Corillian Cafe, now part of CheckFree</a>
                  </strong>
                  <br />
                </b>3400 NW John Olsen Place<br />
Hillsboro, OR 97124</td>
            </tr>
            <tr>
              <td valign="top" width="60" align="right">
                <b>WHO:</b>
              </td>
              <td width="476">
                <p>
                  <strong>
                    <a href="http://thecodetrip.com/">The Code Trip Team</a>
                  </strong>
                </p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="60" align="right">
                <b>TOPIC:</b>
              </td>
              <td width="476">
                <p>
                  <strong>
                    <strong>Mix-a-Lot<br /></strong>
                  </strong>Join us at the Portland Area .NET User Group (PADNUG) where we run
through the newest technologies to emerge from MIX08, including Silverlight 2 Beta
1, Internet Explorer 8, SQL Server Data Services, Windows Live, and more.
</p>
              </td>
            </tr>
          </tbody>
        </table>
        <p>
Also, don't forget to <a href="http://upcoming.yahoo.com/event/468242/">register</a> for
the <a href="http://pdxwebfoot.com/">PDX Webfoot</a> event on Saturday! It should
be a great event and it looks like it will be a <strong>fabulous</strong> day to bring
the family out to an event. We're using Yahoo!'s Upcoming for registration at: <a title="http://upcoming.yahoo.com/event/468242/" href="http://upcoming.yahoo.com/event/468242/">http://upcoming.yahoo.com/event/468242/</a>.
There'll be food and lot's of give-aways.
</p>
        <p>
While you are at it, consider visiting our Premium Sponsors that make these meetings
possible: 
</p>
        <blockquote>
          <p>
            <a href="http://www.aivea.com/">Aivea</a> - <a href="http://www.aivea.com/">http://www.aivea.com/</a><br /><a href="http://www.ascentium.com/">Ascentium</a> - <a href="http://www.ascentium.com/">http://www.ascentium.com/</a><br /><a href="http://www.microsoft.com/">Microsoft</a> - <a href="http://www.microsoft.com/">http://www.microsoft.com/</a><br /><a href="http://www.obsglobal.com/">Online Business Systems</a> - <a href="http://www.obsglobal.com/">http://www.obsglobal.com/</a><br /><a href="http://www.oreilly.com/">O'Reilly</a> - <a href="http://www.oreilly.com/">http://www.oreilly.com/</a><br /><a href="http://www.roberthalftechnology.com/">Robert Half Technology</a> - <a href="http://www.roberthalftechnology.com/">http://www.roberthalftechnology.com/</a><br /><strong><a href="http://submain.com/codeit.right">SubMain and CodeIt.Right</a> - </strong><a title="http://submain.com/" href="http://submain.com/codeit.right">http://submain.com/codeit.right</a><br /><strong><a href="http://www.jetbrains.com/resharper/">JetBrains</a> - </strong><a title="http://www.jetbrains.com/resharper/" href="http://www.jetbrains.com/resharper/">http://www.jetbrains.com/resharper/</a></p>
        </blockquote>
        <p>
Looking forward to seeing you all there!
</p>
      </body>
      <title>April PADNUG Meeting - Mix-a-Lot</title>
      <guid isPermaLink="false">http://richhubbins.theclaussens.com/PermaLink,guid,a007e5fa-1f1a-4194-8128-51d8f3898cd3.aspx</guid>
      <link>http://richhubbins.theclaussens.com/2008/04/09/AprilPADNUGMeetingMixaLot.aspx</link>
      <pubDate>Wed, 09 Apr 2008 11:58:45 GMT</pubDate>
      <description>&lt;p&gt;
The Code Trip is near its end at the MVP summit. Join us Thursday at the Corillian
Cafe to cheer the team on through the final leg of their journey.
&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="60" align="right"&gt;
&lt;b&gt;WHAT:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width="476"&gt;
&lt;strong&gt;April PADNUG Meeting&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60" align="right"&gt;
&lt;b&gt;WHEN:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width="476"&gt;
&lt;b&gt;&lt;a href="http://theclaussens.com/CalendarLinks/PADNUG200804.vcs"&gt;Thursday 04/10/2008&lt;/a&gt; &lt;/b&gt;
&lt;br&gt;
6:00 p.m. Pizza (by &lt;a href="http://www.ascentium.com/"&gt;Ascentium&lt;/a&gt;)&lt;br&gt;
6:30 p.m. Presentation&lt;br&gt;
~9:00 p.m. After Words at Cornelius Pass Roadhouse&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60" align="right"&gt;
&lt;b&gt;WHERE:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width="476"&gt;
&lt;b&gt;&lt;strong&gt;&lt;a href="http://shrinkster.com/mjf"&gt;Corillian Cafe, now part of CheckFree&lt;/a&gt;&lt;/strong&gt;
&lt;br&gt;
&lt;/b&gt;3400 NW John Olsen Place&lt;br&gt;
Hillsboro, OR 97124&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60" align="right"&gt;
&lt;b&gt;WHO:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width="476"&gt;
&lt;p&gt;
&lt;strong&gt;&lt;a href="http://thecodetrip.com/"&gt;The Code Trip Team&lt;/a&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60" align="right"&gt;
&lt;b&gt;TOPIC:&lt;/b&gt; 
&lt;/td&gt;
&lt;td width="476"&gt;
&lt;p&gt;
&lt;strong&gt;&lt;strong&gt;Mix-a-Lot&lt;br&gt;
&lt;/strong&gt;&lt;/strong&gt;Join us at the Portland Area .NET User Group (PADNUG) where we run
through the newest technologies to emerge from MIX08, including Silverlight 2 Beta
1, Internet Explorer 8, SQL Server Data Services, Windows Live, and more.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Also, don't forget to &lt;a href="http://upcoming.yahoo.com/event/468242/"&gt;register&lt;/a&gt; for
the &lt;a href="http://pdxwebfoot.com/"&gt;PDX Webfoot&lt;/a&gt; event on Saturday! It should
be a great event and it looks like it will be a &lt;strong&gt;fabulous&lt;/strong&gt; day to bring
the family out to an event. We're using Yahoo!'s Upcoming for registration at: &lt;a title="http://upcoming.yahoo.com/event/468242/" href="http://upcoming.yahoo.com/event/468242/"&gt;http://upcoming.yahoo.com/event/468242/&lt;/a&gt;.
There'll be food and lot's of give-aways.
&lt;/p&gt;
&lt;p&gt;
While you are at it, consider visiting our Premium Sponsors that make these meetings
possible: 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="http://www.aivea.com/"&gt;Aivea&lt;/a&gt; - &lt;a href="http://www.aivea.com/"&gt;http://www.aivea.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.ascentium.com/"&gt;Ascentium&lt;/a&gt; - &lt;a href="http://www.ascentium.com/"&gt;http://www.ascentium.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.microsoft.com/"&gt;Microsoft&lt;/a&gt; - &lt;a href="http://www.microsoft.com/"&gt;http://www.microsoft.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.obsglobal.com/"&gt;Online Business Systems&lt;/a&gt; - &lt;a href="http://www.obsglobal.com/"&gt;http://www.obsglobal.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.oreilly.com/"&gt;O'Reilly&lt;/a&gt; - &lt;a href="http://www.oreilly.com/"&gt;http://www.oreilly.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.roberthalftechnology.com/"&gt;Robert Half Technology&lt;/a&gt; - &lt;a href="http://www.roberthalftechnology.com/"&gt;http://www.roberthalftechnology.com/&lt;/a&gt; 
&lt;br&gt;
&lt;strong&gt;&lt;a href="http://submain.com/codeit.right"&gt;SubMain and CodeIt.Right&lt;/a&gt; - &lt;/strong&gt;&lt;a title="http://submain.com/" href="http://submain.com/codeit.right"&gt;http://submain.com/codeit.right&lt;/a&gt;
&lt;br&gt;
&lt;strong&gt;&lt;a href="http://www.jetbrains.com/resharper/"&gt;JetBrains&lt;/a&gt; - &lt;/strong&gt;&lt;a title="http://www.jetbrains.com/resharper/" href="http://www.jetbrains.com/resharper/"&gt;http://www.jetbrains.com/resharper/&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Looking forward to seeing you all there!
&lt;/p&gt;</description>
      <comments>http://richhubbins.theclaussens.com/CommentView,guid,a007e5fa-1f1a-4194-8128-51d8f3898cd3.aspx</comments>
      <category>.NET</category>
      <category>Developer</category>
      <category>PADNUG</category>
      <category>SQL</category>
      <category>Technology</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://richhubbins.theclaussens.com/Trackback.aspx?guid=48d6578c-0b25-4476-9c7c-f304cff166cd</trackback:ping>
      <pingback:server>http://richhubbins.theclaussens.com/pingback.aspx</pingback:server>
      <pingback:target>http://richhubbins.theclaussens.com/PermaLink,guid,48d6578c-0b25-4476-9c7c-f304cff166cd.aspx</pingback:target>
      <dc:creator>Rich Claussen</dc:creator>
      <wfw:comment>http://richhubbins.theclaussens.com/CommentView,guid,48d6578c-0b25-4476-9c7c-f304cff166cd.aspx</wfw:comment>
      <wfw:commentRss>http://richhubbins.theclaussens.com/SyndicationService.asmx/GetEntryCommentsRss?guid=48d6578c-0b25-4476-9c7c-f304cff166cd</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Arnie is one of the top SQL Server people in the area. He is going to give us a look
ahead at the coming release of SQL Server 2008.
</p>
        <table>
          <tbody>
            <tr>
              <td valign="top" align="right">
                <b>WHAT:</b>
              </td>
              <td>
                <b>February Bonus PADNUG Meeting</b>
              </td>
            </tr>
            <tr>
              <td valign="top" align="right">
                <b>WHEN:</b>
              </td>
              <td>
                <b>
                  <a href="http://theclaussens.com/CalendarLinks/PADNUG200802B.vcs">Tuesday 02/19/2008</a>
                </b>
                <br />
6:00 p.m. Sandwiches<br />
6:30 p.m. Presentation 
</td>
            </tr>
            <tr>
              <td valign="top" align="right">
                <b>WHERE:</b>
              </td>
              <td>
                <b>
                  <a href="http://tinyurl.com/ylkttk">Microsoft Portland Office located in Lincoln
Tower</a>
                </b>
                <br />
10260 SW Greenburg Road<br />
Suite 600<br />
Portland, OR 97223 
</td>
            </tr>
            <tr>
              <td valign="top" align="right">
                <b>WHO:</b>
              </td>
              <td>
                <p>
Arnie Rowland
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" align="right">
                <b>TOPIC:</b>
              </td>
              <td>
                <p>
                  <strong>SQL Server 2008 Intro Part 1<br /></strong>Come see what's new in SQL Server 2008. This is part one of two meetings
we'll hold.
</p>
              </td>
            </tr>
          </tbody>
        </table>
        <p>
While you are at it, consider visiting our Premium Sponsors that make these meetings
possible: 
</p>
        <blockquote>
          <p>
            <a href="http://www.aivea.com/">Aivea</a> - <a href="http://www.aivea.com/">http://www.aivea.com/</a><br /><a href="http://www.ascentium.com/">Ascentium</a> - <a href="http://www.ascentium.com/">http://www.ascentium.com/</a><br /><a href="http://www.microsoft.com/">Microsoft</a> - <a href="http://www.microsoft.com/">http://www.microsoft.com/</a><br /><a href="http://www.obsglobal.com/">Online Business Systems</a> - <a href="http://www.obsglobal.com/">http://www.obsglobal.com/</a><br /><a href="http://www.oreilly.com/">O'Reilly</a> - <a href="http://www.oreilly.com/">http://www.oreilly.com/</a><br /><a href="http://www.roberthalftechnology.com/">Robert Half Technology</a> - <a href="http://www.roberthalftechnology.com/">http://www.roberthalftechnology.com/</a></p>
        </blockquote>
        <p>
Looking forward to seeing you all there!
</p>
      </body>
      <title>February Bonus PADNUG Meeting - SQL Server 2008 Intro Part 1</title>
      <guid isPermaLink="false">http://richhubbins.theclaussens.com/PermaLink,guid,48d6578c-0b25-4476-9c7c-f304cff166cd.aspx</guid>
      <link>http://richhubbins.theclaussens.com/2008/02/19/FebruaryBonusPADNUGMeetingSQLServer2008IntroPart1.aspx</link>
      <pubDate>Tue, 19 Feb 2008 13:22:08 GMT</pubDate>
      <description>&lt;p&gt;
Arnie is one of the top SQL Server people in the area. He is going to give us a look
ahead at the coming release of SQL Server 2008.
&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" align="right"&gt;
&lt;b&gt;WHAT:&lt;/b&gt; 
&lt;/td&gt;
&lt;td&gt;
&lt;b&gt;February Bonus PADNUG Meeting&lt;/b&gt; 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" align="right"&gt;
&lt;b&gt;WHEN:&lt;/b&gt; 
&lt;/td&gt;
&lt;td&gt;
&lt;b&gt;&lt;a href="http://theclaussens.com/CalendarLinks/PADNUG200802B.vcs"&gt;Tuesday 02/19/2008&lt;/a&gt; &lt;/b&gt;
&lt;br&gt;
6:00 p.m. Sandwiches&lt;br&gt;
6:30 p.m. Presentation 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" align="right"&gt;
&lt;b&gt;WHERE:&lt;/b&gt; 
&lt;/td&gt;
&lt;td&gt;
&lt;b&gt;&lt;a href="http://tinyurl.com/ylkttk"&gt;Microsoft Portland Office located in Lincoln
Tower&lt;/a&gt; &lt;/b&gt;
&lt;br&gt;
10260 SW Greenburg Road&lt;br&gt;
Suite 600&lt;br&gt;
Portland, OR 97223 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" align="right"&gt;
&lt;b&gt;WHO:&lt;/b&gt; 
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;
Arnie Rowland
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" align="right"&gt;
&lt;b&gt;TOPIC:&lt;/b&gt; 
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;
&lt;strong&gt;SQL Server 2008 Intro Part 1&lt;br&gt;
&lt;/strong&gt;Come see what's new in SQL Server 2008. This is part one of two meetings
we'll hold.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
While you are at it, consider visiting our Premium Sponsors that make these meetings
possible: 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="http://www.aivea.com/"&gt;Aivea&lt;/a&gt; - &lt;a href="http://www.aivea.com/"&gt;http://www.aivea.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.ascentium.com/"&gt;Ascentium&lt;/a&gt; - &lt;a href="http://www.ascentium.com/"&gt;http://www.ascentium.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.microsoft.com/"&gt;Microsoft&lt;/a&gt; - &lt;a href="http://www.microsoft.com/"&gt;http://www.microsoft.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.obsglobal.com/"&gt;Online Business Systems&lt;/a&gt; - &lt;a href="http://www.obsglobal.com/"&gt;http://www.obsglobal.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.oreilly.com/"&gt;O'Reilly&lt;/a&gt; - &lt;a href="http://www.oreilly.com/"&gt;http://www.oreilly.com/&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.roberthalftechnology.com/"&gt;Robert Half Technology&lt;/a&gt; - &lt;a href="http://www.roberthalftechnology.com/"&gt;http://www.roberthalftechnology.com/&lt;/a&gt; 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Looking forward to seeing you all there!
&lt;/p&gt;</description>
      <comments>http://richhubbins.theclaussens.com/CommentView,guid,48d6578c-0b25-4476-9c7c-f304cff166cd.aspx</comments>
      <category>.NET</category>
      <category>Developer</category>
      <category>PADNUG</category>
      <category>SQL</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://richhubbins.theclaussens.com/Trackback.aspx?guid=238aace1-3896-494b-9490-5cb361a37767</trackback:ping>
      <pingback:server>http://richhubbins.theclaussens.com/pingback.aspx</pingback:server>
      <pingback:target>http://richhubbins.theclaussens.com/PermaLink,guid,238aace1-3896-494b-9490-5cb361a37767.aspx</pingback:target>
      <dc:creator>Rich Claussen</dc:creator>
      <wfw:comment>http://richhubbins.theclaussens.com/CommentView,guid,238aace1-3896-494b-9490-5cb361a37767.aspx</wfw:comment>
      <wfw:commentRss>http://richhubbins.theclaussens.com/SyndicationService.asmx/GetEntryCommentsRss?guid=238aace1-3896-494b-9490-5cb361a37767</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is just one of those little reminders to self. Self, you never seem to remember
how to assign the return value from a stored procedure to a variable in SQL. I try
various forms and always seem to miss the right one. So, in an effort to mark it for
my future use, I place it here in the blog.
</p>
        <p>
One does <strong>NOT</strong> accomplish it through any of these methods:
</p>
        <div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">DECLARE </span>@ReturnedValue <span style="COLOR: blue">INT</span></p>
          <p style="MARGIN: 0px">
    <span style="COLOR: blue">SET </span>@ReturnedValue = StoredProcedure
@Param1, @Param2
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">IF</span>( @ReturnedValue = @Something )
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">BEGIN</span>
          </p>
          <p style="MARGIN: 0px">
    <span style="COLOR: green">--Do This Stuff</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">END</span>
          </p>
          <p style="MARGIN: 0px">
 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">DECLARE </span>@ReturnedValue <span style="COLOR: blue">INT</span></p>
          <p style="MARGIN: 0px">
    <span style="COLOR: blue">SET </span>@ReturnedValue = StoredProcedure
( @Param1, @Param2 )
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">IF</span>( @ReturnedValue = @Something )
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">BEGIN</span>
          </p>
          <p style="MARGIN: 0px">
    <span style="COLOR: green">--Do This Stuff</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">END</span>
          </p>
          <p style="MARGIN: 0px">
 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">DECLARE </span>@ReturnedValue <span style="COLOR: blue">INT</span></p>
          <p style="MARGIN: 0px">
    <span style="COLOR: blue">SET </span>@ReturnedValue = <span style="COLOR: blue">EXEC </span>StoredProcedure
@Param1, @Param2
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">IF</span>( @ReturnedValue = @Something )
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">BEGIN</span>
          </p>
          <p style="MARGIN: 0px">
    <span style="COLOR: green">--Do This Stuff</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">END</span>
          </p>
          <p style="MARGIN: 0px">
 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">DECLARE </span>@ReturnedValue <span style="COLOR: blue">INT</span></p>
          <p style="MARGIN: 0px">
    <span style="COLOR: blue">SET </span>@ReturnedValue = <span style="COLOR: blue">EXEC </span>StoredProcedure
( @Param1, @Param2 )
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">IF</span>( @ReturnedValue = @Something )
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">BEGIN</span>
          </p>
          <p style="MARGIN: 0px">
    <span style="COLOR: green">--Do This Stuff</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">END</span>
          </p>
        </div>
        <!--EndFragment-->
        <p>
One does by this method:
</p>
        <div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">DECLARE </span>@ReturnedValue <span style="COLOR: blue">INT</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">EXEC </span>   @ReturnedValue = StoredProcedure
@Param1, @Param2
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">IF</span>( @ReturnedValue = @Something )
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">BEGIN</span>
          </p>
          <p style="MARGIN: 0px">
    <span style="COLOR: green">--Do This Stuff</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">END</span>
          </p>
        </div>
        <!--EndFragment-->
        <p>
I just have to remember the order. I suppose it makes sense when I see it, but I forget
when it's time to type it. It's just too easy to get mixed up with Function format.
</p>
      </body>
      <title>Assigning the Scalar from a Stored Procedure</title>
      <guid isPermaLink="false">http://richhubbins.theclaussens.com/PermaLink,guid,238aace1-3896-494b-9490-5cb361a37767.aspx</guid>
      <link>http://richhubbins.theclaussens.com/2006/08/25/AssigningTheScalarFromAStoredProcedure.aspx</link>
      <pubDate>Fri, 25 Aug 2006 00:50:34 GMT</pubDate>
      <description>&lt;p&gt;
This is just one of those little reminders to self. Self, you never seem to remember
how to assign the return value from a stored procedure to a variable in SQL. I try
various forms and always seem to miss the right one. So, in an effort to mark it for
my future use, I place it here in the blog.
&lt;/p&gt;
&lt;p&gt;
One does &lt;strong&gt;NOT&lt;/strong&gt; accomplish it through any of these methods:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;DECLARE &lt;/span&gt;@ReturnedValue &lt;span style="COLOR: blue"&gt;INT&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;SET &lt;/span&gt;@ReturnedValue = StoredProcedure
@Param1, @Param2
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;IF&lt;/span&gt;( @ReturnedValue = @Something )
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;BEGIN&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;--Do This Stuff&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;END&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;DECLARE &lt;/span&gt;@ReturnedValue &lt;span style="COLOR: blue"&gt;INT&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;SET &lt;/span&gt;@ReturnedValue = StoredProcedure
( @Param1, @Param2 )
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;IF&lt;/span&gt;( @ReturnedValue = @Something )
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;BEGIN&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;--Do This Stuff&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;END&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;DECLARE &lt;/span&gt;@ReturnedValue &lt;span style="COLOR: blue"&gt;INT&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;SET &lt;/span&gt;@ReturnedValue = &lt;span style="COLOR: blue"&gt;EXEC &lt;/span&gt;StoredProcedure
@Param1, @Param2
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;IF&lt;/span&gt;( @ReturnedValue = @Something )
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;BEGIN&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;--Do This Stuff&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;END&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;DECLARE &lt;/span&gt;@ReturnedValue &lt;span style="COLOR: blue"&gt;INT&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;SET &lt;/span&gt;@ReturnedValue = &lt;span style="COLOR: blue"&gt;EXEC &lt;/span&gt;StoredProcedure
( @Param1, @Param2 )
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;IF&lt;/span&gt;( @ReturnedValue = @Something )
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;BEGIN&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;--Do This Stuff&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;END&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;
&lt;p&gt;
One does by this method:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;DECLARE &lt;/span&gt;@ReturnedValue &lt;span style="COLOR: blue"&gt;INT&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;EXEC &lt;/span&gt;&amp;nbsp;&amp;nbsp; @ReturnedValue = StoredProcedure
@Param1, @Param2
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;IF&lt;/span&gt;( @ReturnedValue = @Something )
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;BEGIN&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;--Do This Stuff&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;END&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;
&lt;p&gt;
I just have to remember the order. I suppose it makes sense when I see it, but I forget
when it's time to type it. It's just too easy to get mixed up with Function format.
&lt;/p&gt;</description>
      <comments>http://richhubbins.theclaussens.com/CommentView,guid,238aace1-3896-494b-9490-5cb361a37767.aspx</comments>
      <category>Developer</category>
      <category>SQL</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://richhubbins.theclaussens.com/Trackback.aspx?guid=eff74c6f-b66d-4812-b9bd-8c62f942888f</trackback:ping>
      <pingback:server>http://richhubbins.theclaussens.com/pingback.aspx</pingback:server>
      <pingback:target>http://richhubbins.theclaussens.com/PermaLink,guid,eff74c6f-b66d-4812-b9bd-8c62f942888f.aspx</pingback:target>
      <dc:creator>Rich Claussen</dc:creator>
      <wfw:comment>http://richhubbins.theclaussens.com/CommentView,guid,eff74c6f-b66d-4812-b9bd-8c62f942888f.aspx</wfw:comment>
      <wfw:commentRss>http://richhubbins.theclaussens.com/SyndicationService.asmx/GetEntryCommentsRss?guid=eff74c6f-b66d-4812-b9bd-8c62f942888f</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is a question asked of Google that led to my blog today. Of course, I haven't
blogged on such a thing, but I figure what the heck? Let's do it!
</p>
        <p>
For the next person that searches for such an item, the opposite of SELECT TOP is
also SELECT TOP. Huh? You simply change the ORDER BY clause to be descending. For
example, if you have a query such as:
</p>
        <div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New">
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">SELECT TOP </span>10 FirstName, LastName, BirthDate
</p>
          <p style="MARGIN: 0px">
  <span style="COLOR: blue">FROM </span>Persons
</p>
          <p style="MARGIN: 0px">
 <span style="COLOR: blue">ORDER BY </span>LastName, FirstName
</p>
        </div>
        <!--EndFragment-->
        <p>
then the opposite would be:
</p>
        <div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New">
          <p style="MARGIN: 0px">
            <span style="COLOR: blue">SELECT TOP </span>10 FirstName, LastName, BirthDate
</p>
          <p style="MARGIN: 0px">
  <span style="COLOR: blue">FROM </span>Persons
</p>
          <p style="MARGIN: 0px">
 <span style="COLOR: blue">ORDER BY </span>LastName <span style="COLOR: blue">DESC</span>,
FirstName <span style="COLOR: blue">DESC</span></p>
        </div>
        <!--EndFragment-->
        <p>
Simple, huh?
</p>
        <p>
You may be asking, "What if I don't care about the order?" Then I have to say that
you don't really care about TOP versus BOTTOM, either as you are going to get a random
(as far as we know) set of rows in either case.
</p>
      </body>
      <title>What's the Opposite of a SELECT TOP in SQL?</title>
      <guid isPermaLink="false">http://richhubbins.theclaussens.com/PermaLink,guid,eff74c6f-b66d-4812-b9bd-8c62f942888f.aspx</guid>
      <link>http://richhubbins.theclaussens.com/2006/05/23/WhatsTheOppositeOfASELECTTOPInSQL.aspx</link>
      <pubDate>Tue, 23 May 2006 07:04:28 GMT</pubDate>
      <description>&lt;p&gt;
This is a question asked of Google that led to my blog today. Of course, I haven't
blogged on such a thing, but I figure what the heck? Let's do it!
&lt;/p&gt;
&lt;p&gt;
For the next person that searches for such an item, the opposite of SELECT TOP&amp;nbsp;is
also SELECT TOP. Huh? You simply change the ORDER BY clause to be descending. For
example, if you have a query such as:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;SELECT TOP &lt;/span&gt;10 FirstName, LastName, BirthDate
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp; &lt;span style="COLOR: blue"&gt;FROM &lt;/span&gt;Persons
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&lt;span style="COLOR: blue"&gt;ORDER BY &lt;/span&gt;LastName, FirstName
&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;
&lt;p&gt;
then the opposite would be:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;SELECT TOP &lt;/span&gt;10 FirstName, LastName, BirthDate
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp; &lt;span style="COLOR: blue"&gt;FROM &lt;/span&gt;Persons
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&lt;span style="COLOR: blue"&gt;ORDER BY &lt;/span&gt;LastName &lt;span style="COLOR: blue"&gt;DESC&lt;/span&gt;,
FirstName &lt;span style="COLOR: blue"&gt;DESC&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;
&lt;p&gt;
Simple, huh?
&lt;/p&gt;
&lt;p&gt;
You may be asking, "What if I don't care about the order?" Then I have to say that
you don't really care about TOP versus BOTTOM, either as you are going to get a random
(as far as we&amp;nbsp;know)&amp;nbsp;set of rows in either case.
&lt;/p&gt;</description>
      <comments>http://richhubbins.theclaussens.com/CommentView,guid,eff74c6f-b66d-4812-b9bd-8c62f942888f.aspx</comments>
      <category>Developer</category>
      <category>SQL</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://richhubbins.theclaussens.com/Trackback.aspx?guid=a0b41f5d-db8a-4217-a47c-22e69a9a93e3</trackback:ping>
      <pingback:server>http://richhubbins.theclaussens.com/pingback.aspx</pingback:server>
      <pingback:target>http://richhubbins.theclaussens.com/PermaLink,guid,a0b41f5d-db8a-4217-a47c-22e69a9a93e3.aspx</pingback:target>
      <dc:creator>Rich Claussen</dc:creator>
      <wfw:comment>http://richhubbins.theclaussens.com/CommentView,guid,a0b41f5d-db8a-4217-a47c-22e69a9a93e3.aspx</wfw:comment>
      <wfw:commentRss>http://richhubbins.theclaussens.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a0b41f5d-db8a-4217-a47c-22e69a9a93e3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
All I can say is: Wow! Nick, you really did a <a href="http://richhubbins.theclaussens.com/2006/02/15/FebruaryPADNUGMeeting.aspx">great
job</a>!
</p>
        <p>
For those that missed it, Nick effectively showed how the .NET Framework already supports all
that is neccesary to make LINQ possible by implementing the SELECTion bit in his own
namespace. Then, dazzled by switching to the packaged namespace without changing the
code.
</p>
        <p>
If you would like to grab the presentation and/or code examples, <a href="https://www.viewableconcepts.com/svn/Public/Padnug%20Presentation%20Materials/Feb%202006%20PADNUG%20(Linq).zip">&lt;&lt;click
here&gt;&gt;</a>. You too will be able to write code like this one day:
</p>
        <div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New">
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    1</span> partial <span style="COLOR: blue">class</span> Program
{
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    2</span>   <span style="COLOR: blue">static</span><span style="COLOR: blue">void</span> DemoCode()
{
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    3</span>     DataContext
dc = <span style="COLOR: blue">new</span> DataContext(
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    4</span>      
"server=(local);database=Northwind;Integrated Security=true");
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    5</span> 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    6</span>     Table&lt;Customer&gt;
customers = dc.GetTable&lt;Customer&gt;();
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    7</span> 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    8</span>     var
results = from customer <span style="COLOR: blue">in</span> customers
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">    9</span>      
      where customer.CustomerID.StartsWith("A")
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   10</span>        
    select customer;
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   11</span> 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   12</span>     Show(results,
"Results from DLinq Query");
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   13</span>   }
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   14</span> }
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   15</span> 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   16</span> [Table(Name="Customers")]
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   17</span> <span style="COLOR: blue">public</span><span style="COLOR: blue">class</span> Customer
{
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   18</span>   [Column(Id=<span style="COLOR: blue">true</span>)]
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   19</span>   <span style="COLOR: blue">public</span><span style="COLOR: blue">string</span> CustomerID;
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   20</span> 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   21</span>   [Column]
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   22</span>   <span style="COLOR: blue">public</span><span style="COLOR: blue">string</span> CompanyName;
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: teal">   23</span> }
</p>
        </div>
        <!--EndFragment-->
        <!--EndFragment-->
      </body>
      <title>Fabulous LINQ Presentation at PADNUG</title>
      <guid isPermaLink="false">http://richhubbins.theclaussens.com/PermaLink,guid,a0b41f5d-db8a-4217-a47c-22e69a9a93e3.aspx</guid>
      <link>http://richhubbins.theclaussens.com/2006/03/01/FabulousLINQPresentationAtPADNUG.aspx</link>
      <pubDate>Wed, 01 Mar 2006 07:32:25 GMT</pubDate>
      <description>&lt;p&gt;
All I can say is: Wow! Nick, you really did a &lt;a href="http://richhubbins.theclaussens.com/2006/02/15/FebruaryPADNUGMeeting.aspx"&gt;great
job&lt;/a&gt;!
&lt;/p&gt;
&lt;p&gt;
For those that missed it, Nick effectively showed how the .NET Framework already supports&amp;nbsp;all
that is neccesary to make LINQ possible by implementing the SELECTion bit in his own
namespace. Then, dazzled by switching to the packaged namespace without changing the
code.
&lt;/p&gt;
&lt;p&gt;
If you would like to grab the presentation and/or code examples, &lt;a href="https://www.viewableconcepts.com/svn/Public/Padnug%20Presentation%20Materials/Feb%202006%20PADNUG%20(Linq).zip"&gt;&amp;lt;&amp;lt;click
here&amp;gt;&amp;gt;&lt;/a&gt;. You too will be able to write code like this one day:
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: white; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;/span&gt;&amp;nbsp;partial &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; Program
{
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DemoCode()
{
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; DataContext
dc = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; DataContext(
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;
"server=(local);database=Northwind;Integrated Security=true");
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Table&amp;lt;Customer&amp;gt;
customers = dc.GetTable&amp;lt;Customer&amp;gt;();
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;8&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; var
results = from customer &lt;span style="COLOR: blue"&gt;in&lt;/span&gt; customers
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; where customer.CustomerID.StartsWith("A")
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; select customer;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;11&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;12&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Show(results,
"Results from DLinq Query");
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;13&lt;/span&gt;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;14&lt;/span&gt;&amp;nbsp;}
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;15&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;16&lt;/span&gt;&amp;nbsp;[Table(Name="Customers")]
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;17&lt;/span&gt;&amp;nbsp;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; Customer
{
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;18&lt;/span&gt;&amp;nbsp;&amp;nbsp; [Column(Id=&lt;span style="COLOR: blue"&gt;true&lt;/span&gt;)]
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;19&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; CustomerID;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;20&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;21&lt;/span&gt;&amp;nbsp;&amp;nbsp; [Column]
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;22&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; CompanyName;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: teal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;23&lt;/span&gt;&amp;nbsp;}
&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;
&lt;!--EndFragment--&gt;</description>
      <comments>http://richhubbins.theclaussens.com/CommentView,guid,a0b41f5d-db8a-4217-a47c-22e69a9a93e3.aspx</comments>
      <category>.NET</category>
      <category>Developer</category>
      <category>PADNUG</category>
      <category>SQL</category>
    </item>
    <item>
      <trackback:ping>http://richhubbins.theclaussens.com/Trackback.aspx?guid=8e58297d-510c-4453-9dd0-15a72d219765</trackback:ping>
      <pingback:server>http://richhubbins.theclaussens.com/pingback.aspx</pingback:server>
      <pingback:target>http://richhubbins.theclaussens.com/PermaLink,guid,8e58297d-510c-4453-9dd0-15a72d219765.aspx</pingback:target>
      <dc:creator>Rich Claussen</dc:creator>
      <wfw:comment>http://richhubbins.theclaussens.com/CommentView,guid,8e58297d-510c-4453-9dd0-15a72d219765.aspx</wfw:comment>
      <wfw:commentRss>http://richhubbins.theclaussens.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8e58297d-510c-4453-9dd0-15a72d219765</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Some time ago, I was asked to devlop some reports for a little tracking application
I'd written for my employer. In my past life, I did a lot of this work (heck, it was
my job!) and feel pretty comfortable using <a href="http://office.microsoft.com/en-us/FX010858001033.aspx">Excel</a> to
twist my numbers around in all sorts of Pivot-y ways.
</p>
        <p>
What I hadn't done is to create pivots that were conditional and customized. I suppose,
with further exploration, I'd find reasonable ways to accomodate my needs from within
Excel, but I had a moment's epiphany - why not just build the proper pivot query in
SQL to begin with?
</p>
        <p>
I know I had seen it done, but never took the time to find out details. So, with this
new thought, I did a bit of exploring - Duh! That's easy! Simply count conditionally
for each column.
</p>
        <p>
So, for posterity's sake - and my own future needs - here follows the basic structure
for doing a pivot table with a SQL query (Counts number of items for a given number
of weeks prior to current):
</p>
        <div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: #ffffff; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: #000000; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New">
          <p style="MARGIN: 0px">
            <span style="COLOR: #0000ff">SELECT TOP </span>100 PERCENT
</p>
          <p style="MARGIN: 0px">
    'Opened On Week' <span style="COLOR: #0000ff">AS </span>LineType,
</p>
          <p style="MARGIN: 0px">
    'All Modules' <span style="COLOR: #0000ff">AS </span>AppModule,
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>4 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"4 Weeks Ago",
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>3 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"3 Weeks Ago",
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>2 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"2 Weeks Ago",
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>1 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"Last Week",
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>0 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"This Week"
</p>
          <p style="MARGIN: 0px">
  <span style="COLOR: #0000ff">FROM </span>PivotTableView
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #0000ff">UNION</span>
          </p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #0000ff">SELECT TOP </span>100 PERCENT
</p>
          <p style="MARGIN: 0px">
    'Opened On Week' <span style="COLOR: #0000ff">AS </span>LineType,
</p>
          <p style="MARGIN: 0px">
    Application + ': ' + ModuleName <span style="COLOR: #0000ff">AS </span>AppModule,
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>4 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"4 Weeks Ago",
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>3 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"3 Weeks Ago",
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>2 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"2 Weeks Ago",
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>1 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"Last Week",
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #0000ff">COUNT</span>( <span style="COLOR: #0000ff">CASE </span>WeeksBackOpened <span style="COLOR: #0000ff">WHEN </span>0 <span style="COLOR: #0000ff">THEN </span>IssueId <span style="COLOR: #0000ff">ELSE
NULL END </span>)
</p>
          <p style="MARGIN: 0px">
       <span style="COLOR: #0000ff">AS </span>"This Week"
</p>
          <p style="MARGIN: 0px">
  <span style="COLOR: #0000ff">FROM </span>PivotTableView
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #0000ff">GROUP BY </span>Application, ModuleName
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #0000ff">ORDER BY </span>AppModule, LineType
</p>
        </div>
        <!--EndFragment-->
      </body>
      <title>Making Pivot Tables with SQL Queries</title>
      <guid isPermaLink="false">http://richhubbins.theclaussens.com/PermaLink,guid,8e58297d-510c-4453-9dd0-15a72d219765.aspx</guid>
      <link>http://richhubbins.theclaussens.com/2005/05/31/MakingPivotTablesWithSQLQueries.aspx</link>
      <pubDate>Tue, 31 May 2005 02:15:13 GMT</pubDate>
      <description>&lt;p&gt;
Some time ago, I was asked to devlop some reports for a little tracking application
I'd written for my employer. In my past life, I did a lot of this work (heck, it was
my job!) and feel pretty comfortable using &lt;a href="http://office.microsoft.com/en-us/FX010858001033.aspx"&gt;Excel&lt;/a&gt; to
twist my numbers around in all sorts of Pivot-y ways.
&lt;/p&gt;
&lt;p&gt;
What I hadn't done is to create pivots that were conditional and customized. I suppose,
with further exploration, I'd find reasonable ways to accomodate my needs from within
Excel, but I had a moment's epiphany - why not just build the proper pivot query in
SQL to begin with?
&lt;/p&gt;
&lt;p&gt;
I know I had seen it done, but never took the time to find out details. So, with this
new thought, I did a bit of exploring -&amp;nbsp;Duh! That's easy! Simply count conditionally
for each column.
&lt;/p&gt;
&lt;p&gt;
So, for posterity's sake -&amp;nbsp;and my own future needs - here follows the basic structure
for doing a pivot table with a SQL query (Counts number of items for a given number
of weeks prior to current):
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0pt; FONT-SIZE: 10pt; BACKGROUND: #ffffff; PADDING-BOTTOM: 0pt; BORDER-LEFT: windowtext 1pt solid; COLOR: #000000; PADDING-TOP: 0pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #0000ff"&gt;SELECT TOP &lt;/span&gt;100 PERCENT
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Opened On Week' &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;LineType,
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'All Modules' &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;AppModule,
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;4 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"4 Weeks Ago",
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;3 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"3 Weeks Ago",
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;2 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"2 Weeks Ago",
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;1 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"Last Week",
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;0 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"This Week"
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;FROM &lt;/span&gt;PivotTableView
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #0000ff"&gt;UNION&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #0000ff"&gt;SELECT TOP &lt;/span&gt;100 PERCENT
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Opened On Week' &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;LineType,
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Application + ': ' + ModuleName &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;AppModule,
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;4 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"4 Weeks Ago",
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;3 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"3 Weeks Ago",
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;2 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"2 Weeks Ago",
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;1 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"Last Week",
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;COUNT&lt;/span&gt;( &lt;span style="COLOR: #0000ff"&gt;CASE &lt;/span&gt;WeeksBackOpened &lt;span style="COLOR: #0000ff"&gt;WHEN &lt;/span&gt;0 &lt;span style="COLOR: #0000ff"&gt;THEN &lt;/span&gt;IssueId &lt;span style="COLOR: #0000ff"&gt;ELSE
NULL END &lt;/span&gt;)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;AS &lt;/span&gt;"This Week"
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;FROM &lt;/span&gt;PivotTableView
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #0000ff"&gt;GROUP BY &lt;/span&gt;Application, ModuleName
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #0000ff"&gt;ORDER BY &lt;/span&gt;AppModule, LineType
&lt;/p&gt;
&lt;/div&gt;
&lt;!--EndFragment--&gt;</description>
      <comments>http://richhubbins.theclaussens.com/CommentView,guid,8e58297d-510c-4453-9dd0-15a72d219765.aspx</comments>
      <category>Developer</category>
      <category>Tips</category>
      <category>SQL</category>
    </item>
  </channel>
</rss>