T-SQL http://sqlmag.com/taxonomy/term/9187/more en Table Variable Tip http://sqlmag.com/t-sql/table-variable-tip <div class="field-deck"> Table variables aren't affected by user transaction rollback </div> <div class="node-body article-body">One great reason to use table variables rather than temporary tables is that table variables aren't affected when a user transaction rolls back.</div> <p><a href="http://sqlmag.com/t-sql/table-variable-tip" target="_blank">read more</a></p> http://sqlmag.com/t-sql/table-variable-tip#comments T-SQL SQL Server Performance SQL Server T-SQL table variables temporary tables Mon, 09 Feb 2015 03:53:00 +0000 22871 at http://sqlmag.com The Last non NULL Puzzle http://sqlmag.com/t-sql/last-non-null-puzzle <div class="field-deck"> Two solutions to a common problem </div> <div class="node-body article-body">Returning the last non NULL value is a common and simple need, but there's no straightforward solution.</div> <p><a href="http://sqlmag.com/t-sql/last-non-null-puzzle" target="_blank">read more</a></p> http://sqlmag.com/t-sql/last-non-null-puzzle#comments T-SQL SQL Server non NULL Null SQL Server T-SQL Fri, 09 Jan 2015 02:30:00 +0000 22321 at http://sqlmag.com Use the TOP Filter's WITH TIES Option http://sqlmag.com/t-sql/use-top-filter-with-ties-option <div class="field-deck"> Learn what this option does </div> <div class="node-body article-body">Take a little quiz to see if you know what the TOP filter's WITH TIES option does.</div> <p><a href="http://sqlmag.com/t-sql/use-top-filter-with-ties-option" target="_blank">read more</a></p> http://sqlmag.com/t-sql/use-top-filter-with-ties-option#comments T-SQL SQL Server TOP filter WITH TIES option Thu, 18 Dec 2014 14:00:00 +0000 21941 at http://sqlmag.com Avoid Unnecessary Lookups when Using ROW_NUMBER for Paging http://sqlmag.com/t-sql/avoid-unnecessary-lookups-when-using-rownumber-paging <div class="field-deck"> Improve your solution's performance </div> <div class="node-body article-body">Eliminate unnecessary lookups to improve the performance of the typical solution for paging using row numbers.</div> <p><a href="http://sqlmag.com/t-sql/avoid-unnecessary-lookups-when-using-rownumber-paging" target="_blank">read more</a></p> http://sqlmag.com/t-sql/avoid-unnecessary-lookups-when-using-rownumber-paging#comments T-SQL SQL Server lookups Paging Performance ROW_NUMBER Thu, 11 Dec 2014 14:00:00 +0000 21931 at http://sqlmag.com Compute a Trimmed Mean http://sqlmag.com/t-sql/compute-trimmed-mean <div class="field-deck"> Learn two methods: the NTILE function and the PERCENT_RANK or CUME_DIST function </div> <div class="node-body article-body">Use the trimmed mean method to exclude outliers from the computation of an average aggregate.</div> <p><a href="http://sqlmag.com/t-sql/compute-trimmed-mean" target="_blank">read more</a></p> http://sqlmag.com/t-sql/compute-trimmed-mean#comments T-SQL SQL Server CUME_DIST NTILE PERCENT_RANK trimmed mean Thu, 04 Dec 2014 14:00:00 +0000 21921 at http://sqlmag.com Learn How to Deduplicate Data http://sqlmag.com/t-sql/learn-how-deduplicate-data <div class="field-deck"> Remove duplicate rows from a table </div> <div class="node-body article-body">Discover a simple method for deduplicating data.</div> <p><a href="http://sqlmag.com/t-sql/learn-how-deduplicate-data" target="_blank">read more</a></p> http://sqlmag.com/t-sql/learn-how-deduplicate-data#comments T-SQL SQL Server data deduplicate duplicate T-SQL Mon, 24 Nov 2014 05:00:00 +0000 21691 at http://sqlmag.com Get Accurate Estimates with Filtered Indexes http://sqlmag.com/t-sql/get-accurate-estimates-filtered-indexes <div class="field-deck"> Improve cardinality estimates </div> <div class="node-body article-body">Use filtered indexes and statistics for improved cardinality estimates.</div> <p><a href="http://sqlmag.com/t-sql/get-accurate-estimates-filtered-indexes" target="_blank">read more</a></p> http://sqlmag.com/t-sql/get-accurate-estimates-filtered-indexes#comments T-SQL SQL Server cardinality estimate filtered index Index T-SQL Tue, 18 Nov 2014 11:00:00 +0000 21681 at http://sqlmag.com Find a Minimum Missing Value http://sqlmag.com/t-sql/find-minimum-missing-value <div class="field-deck"> Determine the most efficient method </div> <div class="node-body article-body">Discover the most efficient method to identify the minimum missing value after the minimum existing value.</div> <p><a href="http://sqlmag.com/t-sql/find-minimum-missing-value" target="_blank">read more</a></p> http://sqlmag.com/t-sql/find-minimum-missing-value#comments T-SQL SQL Server minimum sequence T-SQL value Tue, 11 Nov 2014 05:00:00 +0000 21671 at http://sqlmag.com Quick T-SQL Tip: Parsing Drive and File Information in SQL Server http://sqlmag.com/database-administration/quick-t-sql-tip-parsing-drive-and-file-information-sql-server <div class="node-body article-body">Parsing full physical file names for information is one of those tasks a database administrator (DBA) finds they do on a semi-frequent basis; from looking up SQL Agent Job output paths or reviewing database file metadata. </div> <p><a href="http://sqlmag.com/database-administration/quick-t-sql-tip-parsing-drive-and-file-information-sql-server" target="_blank">read more</a></p> http://sqlmag.com/database-administration/quick-t-sql-tip-parsing-drive-and-file-information-sql-server#comments T-SQL Database Administration file parse path String Transact SQL Tue, 16 Sep 2014 16:12:00 +0000 20341 at http://sqlmag.com T-SQL Challenges: Replenishing and Depleting Quantities http://sqlmag.com/t-sql/t-sql-challenges-replenishing-and-depleting-quantities <div class="field-deck"> Discover an efficient solution for replenishing quantities, and find an efficient solution for depleting quantities </div> <div class="node-body article-body">Itzik discusses two T-SQL challenges: replenishing quantities and depleting quantities. He presents an efficient solution for replenishing quantities and challenges you to find an efficient solution for depleting quantities.</div> <p><a href="http://sqlmag.com/t-sql/t-sql-challenges-replenishing-and-depleting-quantities" target="_blank">read more</a></p> http://sqlmag.com/t-sql/t-sql-challenges-replenishing-and-depleting-quantities#comments T-SQL SQL Server Challenge deplete quantity Performance replenish quantity SQL Server T-SQL Wed, 10 Sep 2014 02:00:00 +0000 20281 at http://sqlmag.com