THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » T-SQL   (RSS)
Showing page 5 of 24 (234 total posts)
  • Increment a variable in the SET clause of an UPDATE statement [T-SQL]

    There’s a very nifty feature of T-SQL that, in my experience, not everyone knows about but is handy for generating surrogate key values as part of an ETL routine. I myself had to ask on Twitter what the syntax was because I couldn’t remember it (thanks to Matija Lah for reminding me) so I think its worth blogging in case I forget it again. To ...
    Posted to Jamie Thomson (Weblog) by jamiet on May 28, 2013
  • Why We Write #4 - An Interview With Doug Lane

    My next guest is Doug Lane, who has been blogging for the past few years on his website: http://www.douglane.net/. Doug is also a speaker who has spoken at SQL Saturdays as well as the SQL PASS Summit, and as I write these interview questions was on his way to speak at the SQL PASS Business Analytics conference in 2013. I also liked quite a few of ...
    Posted to Louis Davidson (Weblog) by drsql on April 23, 2013
  • Obtaining rowcounts when using Composable DML [T-SQL]

    In my August 2009 blog post Exploring Composable DML I introduced a new feature in SQL Server 2008 called Composable DML and also outlined one of its limitations; namely that data from the OUTPUT cannot be aggregated prior to insertion. Composable DML does have some useful scenarios however and one of those is in capturing and storing values that ...
    Posted to Jamie Thomson (Weblog) by jamiet on February 7, 2013
  • Using constraints to enforce uniqueness of ordered sets of rows

    Even the simplest data integrity rules are not easy to implement in the database if instead of individual rows we need to deal with groups or subsets. For example, making sure that a column value is unique in a table is as trivial as creating a unique constraint or index. However, what are we supposed to do if we do not want to store a ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on January 28, 2013
  • One more reason to to understand query plans, not directly performance related

    One of the things that separates a good programmer from a great one is a firm understanding about what is going on inside the computer. For some programming languages, it is very obvious what is going on inside the computer because you are working at a very low level. For example, if you are a C/C++ programmer writing an OS, you will know a lot ...
    Posted to Louis Davidson (Weblog) by drsql on January 22, 2013
  • The client code that handles timeouts

    After timeouts we need to make sure that active transactions, if any, are rolled back. All timeout handling must be done on the client. This post provides the implementation and unit tests. Implementation The following class extends SqlCommand and rolls back active transactions after timeouts:     public static class ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on January 10, 2013
  • After the timeout

    After the timeout, we may sometimes, but not always, end up with an outstanding transaction. If this is the case, we need to rollback the transaction ourselves. Otherwise the consequent commands which use the same connection might not work as expected. Let us debug through some client code and see what is happening in more ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on January 9, 2013
  • The perils of double-dash comments [T-SQL]

    I was checking my Twitter feed on my way in to work this morning and was alerted to an interesting blog post by Valentino Vranken that highlights a problem regarding the OLE DB Source in SSIS. In short, using double-dash comments in SQL statements within the OLE DB Source can cause unexpected results. It really is quite an important read if you’re ...
    Posted to Jamie Thomson (Weblog) by jamiet on December 6, 2012
  • Documenting sp_ssiscatalog

    What is the best way to document an API? Moreover, what is the best way to document a T-SQL API? Before I try to answer those questions I should explain what I mean by “a T-SQL API”. I think of an API as being a collection of well-defined, known, code modules that provide some notion of a service to whomever uses it; in T-SQL terms I tend to ...
    Posted to Jamie Thomson (Weblog) by jamiet on December 4, 2012
« First ... < Previous 3 4 5 6 7 Next > ... Last »
Privacy Statement