﻿<?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" version="2.0"><channel><title>SQLServerCentral.com Content tagged T-SQL, Blogs</title><link>http://www.sqlservercentral.com/</link><description>Content tagged T-SQL, Blogs posted on SQLServerCentral.com</description><language>en-us</language><ttl>360</ttl><managingEditor>sjones@sqlservercentral.com (Steve Jones)</managingEditor><item><title>Comparing an inner join vs a subquery</title><description><![CDATA[<p>I was reading through Stackoverflow today and saw an interesting question.  SQL inner join vs subquery.  The user was comparing...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/sqlstudies/2013/05/03/comparing-an-inner-join-vs-a-subquery/</guid><pubDate>Wed, 08 May 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sqlstudies/2013/05/03/comparing-an-inner-join-vs-a-subquery/</link></item><item><title>SQL Server – Generate Calendar using TSQL</title><description><![CDATA[<p>Introduction
Recently, I was asked to develop a SSRS based report for the Event Management module in MS Dynamics CRM 2011....</p>]]></description><guid>http://www.sqlservercentral.com/blogs/juggling_with_sql/2013/04/09/sql-server-generate-calendar-using-tsql/</guid><pubDate>Tue, 16 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/juggling_with_sql/2013/04/09/sql-server-generate-calendar-using-tsql/</link></item><item><title>UNPIVOT a table using CROSS APPLY</title><description><![CDATA[<p>I generally spend part of each day looking through http://www.stackoverflow.com, http://dba.stackexchange.com or http://www.sqlservercentral.com.  I read through questions that have already...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/sqlstudies/2013/04/01/unpivot-a-table-using-cross-apply/</guid><pubDate>Fri, 12 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sqlstudies/2013/04/01/unpivot-a-table-using-cross-apply/</link></item><item><title>Sub query pass through</title><description><![CDATA[<p>Occasionally in forums and on client sites I see conditional subqueries in statements. This is where the developer has decided...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/dave_ballantynes_blog/2013/03/22/sub-query-pass-through/</guid><pubDate>Tue, 26 Mar 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/dave_ballantynes_blog/2013/03/22/sub-query-pass-through/</link></item><item><title>DROP and CREATE vs ALTER</title><description><![CDATA[<p>When writing a script to change a piece of code, say a stored procedure or view, there are 3 basic...</p><!-- 15 seconds (SQL Monitor) -->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/dba/sql-monitor/entrypage/custom-metrics?utm_source=ssc&utm_medium=pubad&utm_content=15_seconds&utm_campaign=sqlmonitor&utm_term=rss-20017"><img src="http://assets.red-gate.com/external/SSC/monitor_ico.gif" alt="sqlmonitor"></td>   <td><strong>Get alerts within 15 seconds of SQL Server issues</strong><br />SQL Monitor checks performance data every 15 seconds, so you can fix issues before your users even notice them.  <a href="http://www.red-gate.com/products/dba/sql-monitor/entrypage/custom-metrics?utm_source=ssc&utm_medium=pubad&utm_content=15_seconds&utm_campaign=sqlmonitor&utm_term=rss-20017">Start monitoring with a free trial.</a></td>  </tr> </tbody></table>


]]></description><guid>http://www.sqlservercentral.com/blogs/sqlstudies/2013/02/25/drop-and-create-vs-alter/</guid><pubDate>Tue, 05 Mar 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sqlstudies/2013/02/25/drop-and-create-vs-alter/</link></item><item><title>Duplicate rows in a table</title><description><![CDATA[<p>I recently got the following email:
“I just keyed in two rows into a table with all identical column values. How...</p><!-- 15 seconds (SQL Monitor) -->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/dba/sql-monitor/entrypage/custom-metrics?utm_source=ssc&utm_medium=pubad&utm_content=15_seconds&utm_campaign=sqlmonitor&utm_term=rss-20017"><img src="http://assets.red-gate.com/external/SSC/monitor_ico.gif" alt="sqlmonitor"></td>   <td><strong>Get alerts within 15 seconds of SQL Server issues</strong><br />SQL Monitor checks performance data every 15 seconds, so you can fix issues before your users even notice them.  <a href="http://www.red-gate.com/products/dba/sql-monitor/entrypage/custom-metrics?utm_source=ssc&utm_medium=pubad&utm_content=15_seconds&utm_campaign=sqlmonitor&utm_term=rss-20017">Start monitoring with a free trial.</a></td>  </tr> </tbody></table>


]]></description><guid>http://www.sqlservercentral.com/blogs/sqlstudies/2013/02/04/duplicate-rows-in-a-table/</guid><pubDate>Mon, 11 Feb 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sqlstudies/2013/02/04/duplicate-rows-in-a-table/</link></item><item><title>Let’s Talk About Joins</title><description><![CDATA[<p>

T-SQL Tuesday #37
This month please join us in the TSQL blog party that happens on the second tuesday of the...</p><!-- safeguard (SQL Backup) -->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="https://sqlbackup.red-gate.com/LogIn?utm_source=ssc&utm_medium=pubad&utm_content=safeguard_backups&utm_campaign=sqlbackup&utm_term=rss-20016"><img src="http://assets.red-gate.com/external/SSC/backuphosted_white_68x68.png" alt="sqlbackup"></td>   <td><strong>New! Safeguard your SQL backups</strong><br />Protect your backups from onsite disaster with SQL Backup Pro and a Hosted Storage account from Red Gate.  <a href="https://sqlbackup.red-gate.com/LogIn?utm_source=ssc&utm_medium=pubad&utm_content=safeguard_backups&utm_campaign=sqlbackup&utm_term=rss-20016">Learn more</a></td>  </tr> </tbody></table>

]]></description><guid>http://www.sqlservercentral.com/blogs/sqlrnnr/2012/12/11/lets-talk-about-joins/</guid><pubDate>Mon, 17 Dec 2012 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sqlrnnr/2012/12/11/lets-talk-about-joins/</link></item><item><title>T-SQL: CASE Statement</title><description><![CDATA[<p>For the month of December, I’ll be taking a little holiday from blogging. In the meantime, enjoy a few of...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/sql_awesomesauce/2012/12/03/t-sql-case-statement/</guid><pubDate>Tue, 11 Dec 2012 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sql_awesomesauce/2012/12/03/t-sql-case-statement/</link></item><item><title>Tip: OVER and PARTITION BY</title><description><![CDATA[<p>For the month of December, I’ll be taking a little holiday from blogging. In the meantime, enjoy a few of...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/sql_awesomesauce/2012/11/26/tip-over-and-partition-by/</guid><pubDate>Wed, 28 Nov 2012 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sql_awesomesauce/2012/11/26/tip-over-and-partition-by/</link></item><item><title>Don’t believe everything you read: Truncate table is not logged</title><description><![CDATA[<p>Actually I’m not sure if anyone still believes this anymore. If you read the BOL description carefully it states that...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/ctrl-alt-geek/2012/10/31/dont-believe-everything-you-read-truncate-table-is-not-logged/</guid><pubDate>Fri, 02 Nov 2012 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/ctrl-alt-geek/2012/10/31/dont-believe-everything-you-read-truncate-table-is-not-logged/</link></item><item><title>SQL Server # TSQL to Convert STRING in PROPER format</title><description><![CDATA[<p>Problem Statement
SQL Server has got in-built functions to convert the given string into LOWER() or UPPER() format but it does...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/juggling_with_sql/2012/10/15/sql-server-tsql-to-convert-string-in-proper-format/</guid><pubDate>Thu, 18 Oct 2012 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/juggling_with_sql/2012/10/15/sql-server-tsql-to-convert-string-in-proper-format/</link></item><item><title>Multiple CTEs</title><description><![CDATA[<p>Multiple CTEs
It’s somewhat obscure in BOL and I wasn’t able to find any examples but it turns out you can...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/sqlstudies/2012/10/09/multiple-ctes/</guid><pubDate>Thu, 11 Oct 2012 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sqlstudies/2012/10/09/multiple-ctes/</link></item><item><title>SQL Server : Usage of OVER Clause</title><description><![CDATA[<p>
Over  clause can be used in association with aggregate function and ranking function. The over clause determine the partitioning and...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/practicalsqldba/2012/09/10/sql-server-usage-of-over-clause/</guid><pubDate>Mon, 17 Sep 2012 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/practicalsqldba/2012/09/10/sql-server-usage-of-over-clause/</link></item><item><title>The MERGE statement in SQL Server</title><description><![CDATA[<p>The SQL MERGE statement was introduced in SQL Server 2008 and allows you to modify data in a target table based...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/jamesserra/2012/09/05/the-merge-statement-in-sql-server/</guid><pubDate>Thu, 06 Sep 2012 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/jamesserra/2012/09/05/the-merge-statement-in-sql-server/</link></item><item><title>SQL Server 2012 AlwaysOn Availability Groups – Part 3: Setting up AlwaysOn through T-SQL</title><description><![CDATA[<p>
In the last blog posting about AlwaysOn you have seen how you can deploy your first
Availability Group through the AlwaysOn...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/aschenbrenner/2012/07/23/sql-server-2012-alwayson-availability-groups-part-3-setting-up-alwayson-through-t-sql/</guid><pubDate>Wed, 25 Jul 2012 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/aschenbrenner/2012/07/23/sql-server-2012-alwayson-availability-groups-part-3-setting-up-alwayson-through-t-sql/</link></item><item><title>Which SELECT * Is Better?</title><description><![CDATA[<p>The short answer is, of course, none of them, but testing is the only way to be sure.
I was asked,...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/scarydba/2012/05/07/which-select-is-better/</guid><pubDate>Fri, 11 May 2012 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/scarydba/2012/05/07/which-select-is-better/</link></item><item><title>Identity Crisis</title><description><![CDATA[<p>I’m sure most people have identity values lurking somewhere in their databases.  In fact I would guess that most people...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/mat-walters-sql-blog/2012/04/25/identity-crisis/</guid><pubDate>Wed, 02 May 2012 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/mat-walters-sql-blog/2012/04/25/identity-crisis/</link></item><item><title>Checking Your Service Account with T-SQL</title><description><![CDATA[<p>Somehow this slipped by me, but there were some new DMVs added in SQL Server 2008 R2 SP1. I suspect...</p><!-- how to automate(Deployment Manager) -->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/sql-development/sql-prompt/entrypage/effortlessly?utm_source=ssc&utm_medium=pubad&utm_content=breeze&utm_campaign=sqlprompt&utm_term=rss-20015"><img src="http://assets.red-gate.com/external/SSC/deployment-manager-68x68.png" alt="deploymentmanager"></td>   <td><strong>How to automate your .NET and SQL Server deployments</strong><br />Deploy .NET code and SQL Server databases in a single repeatable process with Red Gate Deployment Manager. <a href="http://www.red-gate.com/products/sql-development/sql-prompt/entrypage/effortlessly?utm_source=ssc&utm_medium=pubad&utm_content=breeze&utm_campaign=sqlprompt&utm_term=rss-20015">Start deploying with a 28-day trial</a></td>  </tr> </tbody></table>

]]></description><guid>http://www.sqlservercentral.com/blogs/steve_jones/2012/02/22/checking-your-service-account-with-t-sql/</guid><pubDate>Thu, 01 Mar 2012 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/steve_jones/2012/02/22/checking-your-service-account-with-t-sql/</link></item><item><title>MERGE with OUTPUT clause</title><description><![CDATA[<p>A few days back I was presented with a theoretical challenge, and now I thought I would share my solution...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/sqlservernotesfromthefield/2012/02/21/merge-with-output-clause/</guid><pubDate>Wed, 29 Feb 2012 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sqlservernotesfromthefield/2012/02/21/merge-with-output-clause/</link></item><item><title>Removing Identical Duplicate Rows</title><description><![CDATA[<p>Deleting duplicate rows out of a table can be tricky.  A brute force way to do this is with a...</p>]]></description><guid>http://www.sqlservercentral.com/blogs/sqltact/2012/02/21/removing-identical-duplicate-rows/</guid><pubDate>Tue, 28 Feb 2012 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/blogs/sqltact/2012/02/21/removing-identical-duplicate-rows/</link></item><item><title>Renumbering Rows in a Table Variable (or Table/Temp Table)</title><description><![CDATA[<p>I was recently working on a data cleanup problem where I had to do lots of comparisons of one row...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/72554/</guid><pubDate>Thu, 24 Feb 2011 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/72554/</link></item><item><title>Distincting an IN subquery</title><description><![CDATA[<p>This is going to be a quick one…
I keep seeing forum code (and production code) that includes the DISTINCT in...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/72189/</guid><pubDate>Wed, 26 Jan 2011 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/72189/</link></item><item><title>Getting Fast Counts of Large Service Broker Queues</title><description><![CDATA[<p>Getting Fast Counts of Large Service Broker Queues
This question regarding getting a fast count from a service broker queue came...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/72185/</guid><pubDate>Fri, 21 Jan 2011 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/72185/</link></item><item><title>Check that what you expected is actually what you got - DB's and SQLCMD</title><description><![CDATA[<p>I feel that it is wise move for a script to actually check itself that the database connection that is...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/72178/</guid><pubDate>Thu, 20 Jan 2011 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/72178/</link></item><item><title>Do IF statements cause recompiles?</title><description><![CDATA[<p>I heard this one over at SSC a while back. “Avoid IF statements in stored procedures as they result in...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/71912/</guid><pubDate>Wed, 15 Dec 2010 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/71912/</link></item><item><title>Finding Date Ranges for Calculating Statistics</title><description><![CDATA[<p>Finding Date Ranges for Calculating StatisticsI received the following question from a fellow DBA:
I need your input to derive the...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/69829/</guid><pubDate>Wed, 17 Mar 2010 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/69829/</link></item><item><title>Breaking Down TempDB Contention</title><description><![CDATA[<p>Breaking Down TempDB Contention&#160;
What is tempDB contention?&#160;From the outside looking in, tempDB contention may look like any other blocking. There...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/69759/</guid><pubDate>Wed, 10 Mar 2010 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/69759/</link></item><item><title>Sometimes, you have to fix it yourself</title><description><![CDATA[<p>The Problem
SQL Server is a huge product with lots of moving parts. Bugs happen. Microsoft has a place to voice...</p><!-- 5 Minutes (SQL Source Control)-->
<table border="0" cellpadding="0" cellspacing="10" style="width: 100%;"> <colgroup>  <col width="68" />  <col width="1266" /> </colgroup> <tbody>  <tr align="left" valign="top">   <td>    <a href="http://www.red-gate.com/products/sql-development/sql-source-control/entrypage/5-minutes?utm_source=ssc&utm_medium=pubad&utm_content=5mins&utm_campaign=sqlsourcecontrol&utm_term=rss-20012"><img src="http://assets.red-gate.com/external/SSC/SOC5mins68x68.gif" alt="sqlsourcecontrol"></td>   <td><strong>Database source control in just 5 minutes</strong><br />It takes just 5 minutes to connect your SQL databases to source control. Got 5 minutes to spare?  <a href="http://www.red-gate.com/products/sql-development/sql-source-control/entrypage/5-minutes?utm_source=ssc&utm_medium=pubad&utm_content=5mins&utm_campaign=sqlsourcecontrol&utm_term=rss-20012">Get started now.</a></td>  </tr> </tbody></table>

]]></description><guid>http://www.sqlservercentral.com/redirect/articles/69637/</guid><pubDate>Wed, 24 Feb 2010 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/69637/</link></item><item><title>Quick Tip Of The Day</title><description><![CDATA[<p>Over and over again we are told that the DMV’s only hold data since your last reboot. So, how do...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/69620/</guid><pubDate>Fri, 19 Feb 2010 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/69620/</link></item><item><title>IN and NOT IN</title><description><![CDATA[<p>One of the most common mistakes made in T-SQL is thinking that these behave identically.&#160; I've personally opened up a...</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/69450/</guid><pubDate>Thu, 04 Feb 2010 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/69450/</link></item></channel></rss>