in

SQL Server Blogs

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

Browse by Tags

  • 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
  • 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
  • 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 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems