<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
    <title>code-complete - SQL Server 2k5</title>
    <link>http://www.code-complete.com/code/</link>
    <description>est.1998 :: v. 8.0 </description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <pubDate>Thu, 07 Aug 2008 18:38:59 GMT</pubDate>

    <image>
        <url>http://www.code-complete.com/code/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: code-complete - SQL Server 2k5 - est.1998 :: v. 8.0 </title>
        <link>http://www.code-complete.com/code/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>SQL Server 2008 RTM and Available for download on Technet</title>
    <link>http://www.code-complete.com/code/index.php?/archives/53-SQL-Server-2008-RTM-and-Available-for-download-on-Technet.html</link>
            <category>SQL Server 2k5</category>
    
    <comments>http://www.code-complete.com/code/index.php?/archives/53-SQL-Server-2008-RTM-and-Available-for-download-on-Technet.html#comments</comments>
    <wfw:comment>http://www.code-complete.com/code/wfwcomment.php?cid=53</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.code-complete.com/code/rss.php?version=2.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    

    <author>nospam@example.com (thaddeus)</author>
    <content:encoded>
    The latest release of MS SQL Server has been released to manufacturing today and is available for download for Technet subscribers:  &lt;br /&gt;
&lt;a href=&quot;http://technet.microsoft.com/&quot; &gt;http://technet.microsoft.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Currently the download throughput is only around 80 Kbps, so it&#039;ll take about a full day to download.&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Thu, 07 Aug 2008 12:38:59 -0600</pubDate>
    <guid isPermaLink="false">http://www.code-complete.com/code/index.php?/archives/53-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Sys Admin Appreciation Day</title>
    <link>http://www.code-complete.com/code/index.php?/archives/18-Sys-Admin-Appreciation-Day.html</link>
            <category>Redhat Linux</category>
            <category>SQL Server 2k5</category>
            <category>Win2K3 Server</category>
            <category>Windows Server 2008</category>
    
    <comments>http://www.code-complete.com/code/index.php?/archives/18-Sys-Admin-Appreciation-Day.html#comments</comments>
    <wfw:comment>http://www.code-complete.com/code/wfwcomment.php?cid=18</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.code-complete.com/code/rss.php?version=2.0&amp;type=comments&amp;cid=18</wfw:commentRss>
    

    <author>nospam@example.com (thaddeus)</author>
    <content:encoded>
    &lt;strong&gt;July 27th, 2007 (Last Friday Of July)&lt;br /&gt;
8th Annual&lt;br /&gt;
System Administrator Appreciation Day&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;If you can read this, thank your sysadmin&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.sysadminday.com/&quot;  title=&quot;sysadmins rejoice&quot;&gt;http://www.sysadminday.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 27 Jul 2007 10:59:14 -0600</pubDate>
    <guid isPermaLink="false">http://www.code-complete.com/code/index.php?/archives/18-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>SQL Server 7 database restore to SQL Server 2005</title>
    <link>http://www.code-complete.com/code/index.php?/archives/8-SQL-Server-7-database-restore-to-SQL-Server-2005.html</link>
            <category>SQL Server 2k5</category>
    
    <comments>http://www.code-complete.com/code/index.php?/archives/8-SQL-Server-7-database-restore-to-SQL-Server-2005.html#comments</comments>
    <wfw:comment>http://www.code-complete.com/code/wfwcomment.php?cid=8</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.code-complete.com/code/rss.php?version=2.0&amp;type=comments&amp;cid=8</wfw:commentRss>
    

    <author>nospam@example.com (thaddeus)</author>
    <content:encoded>
    yes, you can successfully restore a database backup created on SQL Server 7 to a SQL Server 2005 database server, however, there a couple of things to remember when you do it:&lt;br /&gt;
&lt;br /&gt;
1. The database will restore in Compatibilty mode 7 (you can tell by right-clicking the db, then selecting properties and going to options &gt; Compatibility level)  - this means a a couple of things:  &lt;br /&gt;
&lt;br /&gt;
&lt;!-- s9ymdb:5 --&gt;&lt;img width=&#039;352&#039; height=&#039;316&#039; style=&quot;float: left; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.code-complete.com/code/uploads/dbprops.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
     A. if your application or the stored procs use the old  &amp;lowast;= syntax for left/right joins your queries will continue to work - that&#039;s good&lt;br /&gt;
     B. you cannot use right click on the database, select Tasks &gt; generate scripts - No database in compatibility mode will appear in the list of databases to script.  that&#039;s bad - although you could probably still use  ErWin to reverse engineer the database into SQL scripts.&lt;br /&gt;
&lt;br /&gt;
So the answer is that you really should change the compatibility mode and fix the legacy syntax in your code (though I personally liked the old syntax better!).  What that means is changing queries that may have looked like this:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
select deptpermissions.departmentid, block.blockcode, block.blockname from deptpermissions, block&lt;br /&gt;where block.blockcode  	&amp;lowast;= deptpermissions.blockcode&lt;br /&gt; and departmentid = &amp;departmentid;&lt;br /&gt;order by block.blockname, deptpermissions.departmentid&lt;br /&gt;&lt;br /&gt;
&lt;/code&gt;							&lt;br /&gt;
&lt;br /&gt;
to look instead like this:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
select deptpermissions.departmentid, block.blockcode, block.blockname from block&lt;br /&gt;
     LEFT JOIN deptpermissions&lt;br /&gt;
     ON block.blockcode = deptpermissions.blockcode&lt;br /&gt;
     where departmentid = &amp;departmentid;&lt;br /&gt;
     order by block.blockname, deptpermissions.departmentid&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 18 May 2007 12:56:17 -0600</pubDate>
    <guid isPermaLink="false">http://www.code-complete.com/code/index.php?/archives/8-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Date-based filename variables in SSIS Packages</title>
    <link>http://www.code-complete.com/code/index.php?/archives/3-Date-based-filename-variables-in-SSIS-Packages.html</link>
            <category>.NET</category>
            <category>SQL Server 2k5</category>
    
    <comments>http://www.code-complete.com/code/index.php?/archives/3-Date-based-filename-variables-in-SSIS-Packages.html#comments</comments>
    <wfw:comment>http://www.code-complete.com/code/wfwcomment.php?cid=3</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.code-complete.com/code/rss.php?version=2.0&amp;type=comments&amp;cid=3</wfw:commentRss>
    

    <author>nospam@example.com (thaddeus)</author>
    <content:encoded>
    Today we had an interesting problem:&lt;br /&gt;
Create an SSIS dtsx package that gets a file from an FTP server, puts it in a local directory, then inserts the data from the file into a table.  Seems pretty easy, right?  Well, the only hard part was getting the regular expression built to get the correct file from the server.  The files are a daily data feed feed called &quot;filename0419&quot;  or filnamemmdd.&lt;br /&gt;
&lt;br /&gt;
We got to the point of setting the variable using this pretty quickly:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&quot;filename&quot; + (DT_WSTR,30)MONTH(GETDATE()) + (DT_WSTR,30)DAY(GETDATE()) &lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
The problem here is that it was returning filename419 - (and would return filename11 if it happened to be Jan. 1)  we needed to pad out the dates being returned by the GETDATE() function.&lt;br /&gt;
&lt;br /&gt;
Here is the solution brought to you by SpireMedia top notch developer Tina:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&quot;filename&quot; + SUBSTRING( (DT_WSTR,30)GETDATE() , 6, 2 ) + SUBSTRING( (DT_WSTR,30)GETDATE() , 9, 2 )&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
this regex returns what we need:  filename0419  (and if it&#039;s Jan 1, filename0101)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Thu, 19 Apr 2007 17:10:42 -0600</pubDate>
    <guid isPermaLink="false">http://www.code-complete.com/code/index.php?/archives/3-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>

</channel>
</rss>