<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>SQL Server/T-SQL</title>
        <link>http://cadred.net/blog/category/7.aspx</link>
        <description>SQL Server/T-SQL</description>
        <language>en-US</language>
        <copyright>Michael Cook</copyright>
        <managingEditor>cadred@cadred.net</managingEditor>
        <generator>Subtext Version 2.0.0.0</generator>
        <item>
            <title>IANADBA2</title>
            <link>http://cadred.net/blog/archive/2004/05/25/180.aspx</link>
            <description>&lt;P&gt;&lt;A class=headermaintitle id=Header1_HeaderTitle href="http://weblogs.asp.net/guerchele/" target=_top&gt;Luciano Evaristo&lt;/A&gt; passes along a &lt;A href="http://weblogs.asp.net/guercheLE/archive/2004/05/23/139994.aspx" target=_top&gt;cool tip on how to get an average from a datetime field&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;To workaround this, just change the SQL statement to &lt;STRONG&gt;SELECT &lt;FONT color=#000080&gt;CAST(&lt;/FONT&gt;AVG(&lt;FONT color=#000080&gt;CAST(&lt;/FONT&gt;MyTable.MyDateTimeField &lt;FONT color=#000080&gt;AS float)&lt;/FONT&gt;) &lt;FONT color=#000080&gt;AS datetime)&lt;/FONT&gt; FROM MyTable &lt;/STRONG&gt;and things will work properly.&lt;/BLOCKQUOTE&gt;&lt;BR&gt;
&lt;P&gt;Cool tip!&lt;/P&gt;&lt;img src="http://cadred.net/blog/aggbug/180.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Cook</dc:creator>
            <guid>http://cadred.net/blog/archive/2004/05/25/180.aspx</guid>
            <pubDate>Tue, 25 May 2004 14:30:00 GMT</pubDate>
            <wfw:comment>http://cadred.net/blog/comments/180.aspx</wfw:comment>
            <comments>http://cadred.net/blog/archive/2004/05/25/180.aspx#feedback</comments>
            <slash:comments>15</slash:comments>
            <wfw:commentRss>http://cadred.net/blog/comments/commentRss/180.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Dealing With Stubborn Sql Server Log Files</title>
            <link>http://cadred.net/blog/archive/2004/05/24/179.aspx</link>
            <description>Normally when you backup a database the log files are automatically truncated, however recently we had a development database that had racked up a 9GB log file! Despite nightly backup's the log file wouldn't clear.&lt;BR&gt;&lt;BR&gt;In order to shrink it down to a manageable size I ran the following commands from Query Analyzer: &lt;BR&gt;&lt;BR&gt;
&lt;DIV class="Code"&gt;BACKUP&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff00ff"&gt;LOG&lt;/SPAN&gt; &lt;EM&gt;DBName&lt;/EM&gt; &lt;SPAN style="COLOR: #0000ff"&gt;WITH &lt;/SPAN&gt;TRUNCATE_ONLY&lt;BR&gt;GO&lt;BR&gt;&lt;SPAN style="COLOR: #0000ff"&gt;DBCC SHRINKFILE&lt;/SPAN&gt;(&lt;EM&gt;LogFileName&lt;/EM&gt;,&lt;EM&gt;SizeInMB&lt;/EM&gt;) &lt;BR&gt;GO &lt;/FONT&gt;&lt;/DIV&gt;&lt;BR&gt;
&lt;P&gt;Now all I have to do is figure out why it get so large in the first place.&lt;/P&gt;&lt;img src="http://cadred.net/blog/aggbug/179.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Cook</dc:creator>
            <guid>http://cadred.net/blog/archive/2004/05/24/179.aspx</guid>
            <pubDate>Mon, 24 May 2004 19:22:00 GMT</pubDate>
            <wfw:comment>http://cadred.net/blog/comments/179.aspx</wfw:comment>
            <comments>http://cadred.net/blog/archive/2004/05/24/179.aspx#feedback</comments>
            <slash:comments>27</slash:comments>
            <wfw:commentRss>http://cadred.net/blog/comments/commentRss/179.aspx</wfw:commentRss>
        </item>
        <item>
            <title>IANADBA</title>
            <link>http://cadred.net/blog/archive/2004/05/24/177.aspx</link>
            <description>I am not a &lt;a target=_top href="http://everything2.com/index.pl?node=Database%20Administrator"&gt;dba&lt;/A&gt;, which is probably why I found &lt;a target=_top href="http://www.sommarskog.se/dynamic_sql.html"&gt;this page on Dynamic SQL&lt;/A&gt; eye-opening and informative. If you are not a fully qualified dba, but find yourself writing stored procedures, it's a must read (or a re-read if you have already seen it).&lt;img src="http://cadred.net/blog/aggbug/177.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Cook</dc:creator>
            <guid>http://cadred.net/blog/archive/2004/05/24/177.aspx</guid>
            <pubDate>Mon, 24 May 2004 11:57:00 GMT</pubDate>
            <wfw:comment>http://cadred.net/blog/comments/177.aspx</wfw:comment>
            <comments>http://cadred.net/blog/archive/2004/05/24/177.aspx#feedback</comments>
            <slash:comments>25</slash:comments>
            <wfw:commentRss>http://cadred.net/blog/comments/commentRss/177.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>