﻿<?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 Articles tagged T-SQL</title><link>http://www.sqlservercentral.com/</link><description>Articles tagged T-SQL posted on SQLServerCentral.com</description><language>en-us</language><ttl>360</ttl><managingEditor>sjones@sqlservercentral.com (Steve Jones)</managingEditor><item><title>Solving Complex T-SQL Problems, Step-By-Step</title><description><![CDATA[<p>What should you do if your first, most intuitive solution to a problem ends up scanning the data more than is necessary, resulting in poor performance? Have you missed a new SQL Server feature that can remove inefficiency from your technique? Alternatively, do you need a little help, and some lateral thinking, to open the path to a different approach? Sometimes, the answer is &quot;both&quot;.</p><!-- disturbing m2 (DBA Bundle) -->
<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/dba-bundle/entrypage/hard-earned-lessons-4?utm_source=ssc&utm_medium=pubad&utm_content=disturbing_m2&utm_campaign=sqldbabundle&utm_term=rss-20019"><img src="http://assets.red-gate.com/external/SSC/top5_68x68.gif" alt="sqldbabundle"></td>   <td><strong>Top 5 hard-earned Lessons of a DBA </strong><br />New! Part 4, ‘Disturbing Development’ by Grant Fritchey, features the return of Joe Deebeeay and a server-threatening encounter with ORMs -  <a href="http://www.red-gate.com/products/dba/dba-bundle/entrypage/hard-earned-lessons-4?utm_source=ssc&utm_medium=pubad&utm_content=disturbing_m2&utm_campaign=sqldbabundle&utm_term=rss-20019">read it here</a></td>  </tr> </tbody></table>
]]></description><guid>http://www.sqlservercentral.com/redirect/articles/98163/</guid><pubDate>Thu, 25 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/98163/</link></item><item><title>Using FULL JOINs to Compare Datasets</title><description><![CDATA[<p>This article describes a technique of using FULL JOINs to compare two datasets within a numerical tolerance.</p><!-- 12 Tools (SQL Dev Bundle)-->
<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-developer-bundle/?utm_source=ssc&utm_medium=pubad&utm_content=12_tools&utm_campaign=sqldeveloperbundle&utm_term=rss-20013"><img src="http://assets.red-gate.com/external/SSC/devbundle_68x68.gif" alt="sqldeveloperbundle"></td>   <td><strong>12 essential tools for database professionals</strong><br />The SQL Developer Bundle contains 12 tools designed with the SQL Server developer and DBA in mind.  <a href="http://www.red-gate.com/products/sql-development/sql-developer-bundle/?utm_source=ssc&utm_medium=pubad&utm_content=12_tools&utm_campaign=sqldeveloperbundle&utm_term=rss-20013">Try it now.</a></td>  </tr> </tbody></table>


]]></description><guid>http://www.sqlservercentral.com/articles/FULL+JOIN/71136/</guid><pubDate>Tue, 23 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/FULL+JOIN/71136/</link></item><item><title>Using Regular Expressions to Convert PL/SQL code to T-SQL</title><description><![CDATA[<p>When converting Oracle PL/SQL to T-SQL, there are a number of ways to do this, but this article shows us how this can be done with regular expressions in Management Studio.</p>]]></description><guid>http://www.sqlservercentral.com/articles/Regular+Expressions/75121/</guid><pubDate>Fri, 19 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/Regular+Expressions/75121/</link></item><item><title>Comparison of Queries Written in T-SQL and SQL Server MDX</title><description><![CDATA[<p>Beginning to learn and comprehend SQL Server Analysis Services (SSAS) MDX queries can be difficult after one has spent years writing queries in T-SQL. When trying to write SQL Server MDX queries, it's worth considering &quot;How would I write this query in T-SQL?&quot;
</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/98160/</guid><pubDate>Fri, 19 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/98160/</link></item><item><title>The Elusive Conditional WHERE Clause</title><description><![CDATA[<p>What's this, a conditional WHERE clause that doesn't use dynamic SQL?</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/97908/</guid><pubDate>Thu, 18 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/97908/</link></item><item><title>The Cascading (CROSS) APPLY</title><description><![CDATA[<p>An old trick nowadays but one which is still underused here on SSC is the cascading CROSS APPLY – where output from one CROSS APPLY is used as input for another.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/97545/</guid><pubDate>Tue, 16 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/97545/</link></item><item><title>T-SQL Coding Style</title><description><![CDATA[<p>When you write T-SQL code what kind of coding style do you use? Do you have a consistent way to comment and format your code? Does your organization provide standards for how you must code your T-SQL? Join Greg Larsen as he discusses some of the coding styles you should consider when writing your T-SQL scripts and stored procedures.</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/redirect/articles/98158/</guid><pubDate>Tue, 16 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/98158/</link></item><item><title>New and Basic Result-set Paging functionality in SQL 2012 Version.</title><description><![CDATA[<p>Overview of 2 very important clauses added to SELECT statement in SQL2012 to allow paging on result sets.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/87361/</guid><pubDate>Wed, 10 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/87361/</link></item><item><title>A Simple Formula to Calculate the ISO Week Number</title><description><![CDATA[<p>He admits it wasn't his idea but his head sure wishes it was.  SQL Server MVP Jeff Moden explains a wonderful, super simple, very high performance formula that will calculate ISO Week Numbers. If you're &quot;stuck&quot; with SQL Server 2005 or less, you're going to like this a whole lot!</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/97910/</guid><pubDate>Mon, 08 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/97910/</link></item><item><title>A Hazard of Using the SQL Merge Statement</title><description><![CDATA[<p>The SQL MERGE statement can make your DML querying more efficient but you need to take care or you may get burned</p>]]></description><guid>http://www.sqlservercentral.com/articles/MERGE/97867/</guid><pubDate>Wed, 03 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/MERGE/97867/</link></item><item><title>TSQL Pivot Rotations using only REPLACE</title><description><![CDATA[<p>Pivoting SQL Server tables is always awkward, even with the PIVOT and UNPIVOT operators. If you want to get the job done without GROUP BY or PIVOT, here is a way to do it using only REPLACE.</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/98036/</guid><pubDate>Mon, 01 Apr 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/98036/</link></item><item><title>Re-throw Errors with Logging </title><description><![CDATA[<p>This article brings you a technique and framework to use in your stored procedures that can allow you to re-throw and log errors.</p>]]></description><guid>http://www.sqlservercentral.com/articles/Error+Handling/97007/</guid><pubDate>Thu, 28 Mar 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/Error+Handling/97007/</link></item><item><title>HASHBYTES: Is CHECKSUM really required?</title><description><![CDATA[<p>When compared with HASHBYTES, CHECKSUM, has a number of drawbacks. Hence, a question that comes up is: Is Checksum really required? In this article, I attempt to answer that question.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/95932/</guid><pubDate>Wed, 27 Mar 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/95932/</link></item><item><title>Search for a Value Throughout Your Database</title><description><![CDATA[<p>Learn how to search for a value throughout all database tables.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/96882/</guid><pubDate>Thu, 14 Mar 2013 06:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/96882/</link></item><item><title>Deleting large number of rows from a table in a VLDB</title><description><![CDATA[<p>For enterprise systems, purging data is a reality. Today, we will see some strategies that I recently implemented to make this process work efficiently.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/72606/</guid><pubDate>Fri, 08 Mar 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/72606/</link></item><item><title>Hidden Tricks To SQL Server Table Cleanup</title><description><![CDATA[<p>How to delete millions of rows with virtually no contention.</p>]]></description><guid>http://www.sqlservercentral.com/articles/delete/96780/</guid><pubDate>Wed, 06 Mar 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/delete/96780/</link></item><item><title>Using a Variable for an IN Predicate</title><description><![CDATA[<p>How to use a passed string variable for an IN type predicate in your queries as a way to more efficiently handle an array of strings.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/73838/</guid><pubDate>Fri, 01 Mar 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/73838/</link></item><item><title>Data Profiling with T-SQL</title><description><![CDATA[<p>Need to understand new data? This article explains why - and how you can profile it efficiently</p>]]></description><guid>http://www.sqlservercentral.com/articles/Data+Profiling/96398/</guid><pubDate>Mon, 25 Feb 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/Data+Profiling/96398/</link></item><item><title>An in-depth look at change detection in SQL Server - Part 02</title><description><![CDATA[<p>Auditing, conflict resolution, tamper &amp; concurrency protection are some of the most common requirements for any enterprise system – this 2-part series presents an in-depth look at the various change detection mechanisms available within SQL Server.</p>]]></description><guid>http://www.sqlservercentral.com/articles/SQL+Server/95931/</guid><pubDate>Tue, 19 Feb 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/SQL+Server/95931/</link></item><item><title>SQL Server 2012: Time Marches On</title><description><![CDATA[<p>Greg Larsen explores the new SQL Server 2012 date and time functions and shows you how to exploit these functions in new application code.</p><!-- disturbing m2 (DBA Bundle) -->
<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/dba-bundle/entrypage/hard-earned-lessons-4?utm_source=ssc&utm_medium=pubad&utm_content=disturbing_m2&utm_campaign=sqldbabundle&utm_term=rss-20019"><img src="http://assets.red-gate.com/external/SSC/top5_68x68.gif" alt="sqldbabundle"></td>   <td><strong>Top 5 hard-earned Lessons of a DBA </strong><br />New! Part 4, ‘Disturbing Development’ by Grant Fritchey, features the return of Joe Deebeeay and a server-threatening encounter with ORMs -  <a href="http://www.red-gate.com/products/dba/dba-bundle/entrypage/hard-earned-lessons-4?utm_source=ssc&utm_medium=pubad&utm_content=disturbing_m2&utm_campaign=sqldbabundle&utm_term=rss-20019">read it here</a></td>  </tr> </tbody></table>
]]></description><guid>http://www.sqlservercentral.com/redirect/articles/96793/</guid><pubDate>Wed, 13 Feb 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/96793/</link></item><item><title>An in-depth look at change detection in SQL Server - Part 01</title><description><![CDATA[<p>Auditing, conflict resolution, tamper &amp; concurrency protection are some of the most common requirements for any enterprise system – this 2-part series presents an in-depth look at the various change detection mechanisms available within SQL Server.</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/articles/change+detection/95930/</guid><pubDate>Tue, 12 Feb 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/change+detection/95930/</link></item><item><title>T-SQL insert using SSIS Data Pump</title><description><![CDATA[<p>This article describes a T-SQL procedure to insert data using the SSIS Data Pump</p>]]></description><guid>http://www.sqlservercentral.com/articles/bulk+insert/73305/</guid><pubDate>Tue, 05 Feb 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/bulk+insert/73305/</link></item><item><title>Silent Truncation of SQL Server Data Inserts</title><description><![CDATA[<p>There are certain circumstances where SQL Server will silently truncate data, without providing an error or warning, before it is inserted into a table.  In this tip we cover some examples of when this occurs.</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/96600/</guid><pubDate>Fri, 01 Feb 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/96600/</link></item><item><title>VARCHAR (MAX), NVARCHAR (MAX) and NTEXT Data Types</title><description><![CDATA[<p>Despite NTEXT and TEXT being deprecated in SQL Server for some time they are still both used in production systems. In this article, I will briefly demonstrate the difference between a VARCHAR (MAX), NVARCHAR (MAX) and the NTEXT data types, and the impact on performance from using NTEXT/TEXT.</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/96066/</guid><pubDate>Mon, 21 Jan 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/96066/</link></item><item><title>Stairway to T-SQL DML Level 12: Using the MERGE Statement</title><description><![CDATA[<p>The final level of this stairway looks at the MERGE statement in detail, focusing on how to perform insert, update and delete logic using the MERGE statement.</p>]]></description><guid>http://www.sqlservercentral.com/articles/Stairway+Series/92557/</guid><pubDate>Wed, 16 Jan 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/Stairway+Series/92557/</link></item><item><title>SQL Server T-SQL Tuning – NOT IN and NOT Exists</title><description><![CDATA[<p>Following on from the previous TSQL performance tuning article in this series, we now focus on the important topic of T-SQL “Not IN” And “Not Exists “</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/96065/</guid><pubDate>Wed, 16 Jan 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/96065/</link></item><item><title>Using a TSQL semaphore in SSIS</title><description><![CDATA[<p>This article shows how you can use a TSQL semaphore in SSIS.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/93759/</guid><pubDate>Mon, 14 Jan 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/93759/</link></item><item><title>SQL Server T-SQL Tuning -TVF and Scalar Functions</title><description><![CDATA[<p>A UDF is very convenient for centralising business logic as we can specify a set of business logic in one UDF which references multiple stored procedures and ad-hoc queries. However, they can lead to significant performance degradation due to their demands on the CPU</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/96063/</guid><pubDate>Thu, 10 Jan 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/96063/</link></item><item><title> SQL Server Rounding Functions - Round, Ceiling and Floor</title><description><![CDATA[<p>I saw your recent tip on Calculating Mathematical Values in SQL Server and have some related issues as I try to round values in my application. My users and me have a difference of opinion on some of the calculations in our reporting applications. All of the code is in T-SQL, but I think the reporting issues are related to data types and rounding down or rounding up rules. Do you have any insight into these issues? I would like to see some examples with a variety of coding options.</p>]]></description><guid>http://www.sqlservercentral.com/redirect/articles/96062/</guid><pubDate>Wed, 09 Jan 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/redirect/articles/96062/</link></item><item><title>Single Quotation Marks in SQL</title><description><![CDATA[<p>One of the common problems is dealing with apostrophes in T-SQL. This article examines the challenges of single quotation marks and ends with a short quiz.</p>]]></description><guid>http://www.sqlservercentral.com/articles/T-SQL/95670/</guid><pubDate>Thu, 03 Jan 2013 07:00:00 UT</pubDate><link>http://www.sqlservercentral.com/articles/T-SQL/95670/</link></item></channel></rss>