in

SQL Server Blogs

Voices from the UK SQL Server Community
All Tags » tsql » SQL Server (RSS)

Browse by Tags

  • Denali Paging–Key seek lookups

    In my previous post “ Denali Paging – is it win.win ? ” I demonstrated the use of using the Paging functionality within Denali.  On reflection,  I think i may of been a little unfair and should of continued always planned to continue my investigations to the next step. In Pauls article , he...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Fri, Nov 19 2010
  • Denali Paging–Is it win/win ?

    I'm not one for automatically poo-pooing new ideas, new practices and new technology. Rather I like to take a measured view and try to evaluate based upon merits. One of the new features in Denali is paging which is now supported by the FETCH option of the ORDER BY clause. On the face of it, it does...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Wed, Nov 10 2010
  • The best things in life are free

    Greg Gonzalez ( blog | twitter ) of SqlSentry , last night released a very cool new and free product.  Plan explorer is a tool for examining query plans and overcomes many of the limitations of viewing plans within Management studio.  If you view plans a lot i would recommend that you give...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Thu, Oct 21 2010
  • An impossible case

    In a previous blog entry ( Inconsistent NullIf behaviour ), Jeff Moden and Dan Halliday ( twitter ) both made a very similar observation. When executing this code Code Snippet select top ( 10 ) abs ( checksum ( newid ()))% 4 from sys . objects the only possible values returned can be 0,1,2 or 3. Anything...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Mon, Sep 6 2010
  • Inconsistent NullIF Behaviour ?

    NullIf can be a very handy function sometimes. For those who have not used it, if the result of the two parameters are equal then null is returned. So if we execute : Code Snippet Select nullif ( 10 , 10 ) as Result1 Select nullif ( 10 , 9 ) as Result2 We get the result of For some test data, I required...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Fri, Aug 6 2010
  • Using a UDF as a SARG. Make a hash of it!

    I am somewhat uncomfortable blogging this, as I feel that it falls into “Polish a turd” category. Having said that, it is a particularly ugly turd and it does polish up rather well. Though as the saying goes, it is still a turd. The evils and inadequacies of UDF (User Defined Functions) in SqlServer...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Fri, Jul 2 2010
  • SQL 101 : Without “ORDER BY”, order is not guaranteed.

    It’s as simple as that. If you don’t specify ORDER BY, then the order of your result set is not guaranteed. Oh sure , there may be situations where the data looks like it is being returned ordered, but this is not really the case. So, for example : CREATE TABLE #Example ( row_id INTEGER ); GO INSERT...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Sun, Jun 27 2010
  • Challenge 19 – An Explanation of a Query

    I have received a number of requests for an explanation of my winning query of TSQL Challenge 19 . This involved traversing a hierarchy of employees and rolling a count of orders from subordinates up to superiors. The first concept I shall address is the hierarchyId , which is constructed within the...
    Posted to SQL and the like (Weblog) by Dave Ballantyne on Thu, May 27 2010
  • Optimal Query Plans With Unbalanced Data Loads

    Sql Server is great at producing and caching efficient query plans.  However these plans may not be the most efficient based upon the parameters passed into subsequent calls off a stored procedure. In this article I am assuming that you have read both of Erland Sommarskog’s articles The Curse and...
    Posted to SQL and the like (Weblog) by Anonymous on Thu, Aug 27 2009
  • Another TSQL random length random string generator

    The following function function will return you a random string of the specified characters, for a length of between @StrLenLo and @StrLenHi. The only ‘Oddity’ with using this function is that if the parameters are not dependant upon data within a table SQLServer will create a hash join which will cause...
    Posted to SQL and the like (Weblog) by Anonymous on Thu, Aug 27 2009
Page 1 of 2 (12 items) 1 2 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems