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 » sql server » T-SQL   (RSS)
Showing page 3 of 5 (48 total posts)
  • Debunking Kimball Effective Dates part 2 – Windowing Functions

    Reigniting the [SCDEndDate] debate In November 2009 I wrote a blog post entitled Debunking Kimball Effective Dates where I stated that I was against the Kimball-recommended practice of maintaining a StartDate & EndDate value for every record in a type 2 slowly changing dimension (SCD) table (i.e. the values highlighted in blue in the ...
    Posted to Jamie Thomson (Weblog) by jamiet on July 13, 2011
  • Maintaining version history in your database using Visual Studio 2010

    I have written a few blogs lately explaining how my current project is employing the use of datadude (aka the database development tools in Visual Studio 2010) in order to manage our database code, deployment of that code and also testing of it. In this blog post I’m going to share a little technique that we use in order to store a version history ...
    Posted to Jamie Thomson (Weblog) by jamiet on October 19, 2010
  • bug with sp_rename + sp_refreshview

    Today I’ve found with my Italian collegues a “nice” bug that made us and the customer mad for several hours. The problem is related to sp_rename usage and sp_refreshview. If you have a view like this one create view dbo.a as select c = 1 go and for any reason someone renames it (for example because he wants to change the view but don’t ...
    Posted to Davide Mauri (Weblog) by manowar on October 12, 2010
  • Changing the security context with Dynamic SQL [T-SQL]

    I’ve always found that understanding the SQL security model can be a finicky affair; that’s no criticism, its more to do with my reluctance to actually spend time immersing myself in it – I generally know what I need to know and that’s all. I remember back when I was first learning T-SQL I found the whole area of security around dynamic SQL ...
    Posted to Jamie Thomson (Weblog) by jamiet on October 4, 2010
  • Take your script library with you [T-SQL]

    As SQL professionals I’m sure many of you build up a library of SQL scripts that you take from project to project, right? Here’s a tip for those of you that have such a collection and want to make sure that you always have ready access to it. I’m a big fan of all things sync-related and there are many tools on the market now that will sync the ...
    Posted to Jamie Thomson (Weblog) by jamiet on October 3, 2010
  • Query for index column information

    On nearly every project I ever work on I end up crafting a query that tells me all the information about the indexes in a database. I do of course keep a collection of useful scripts hanging around though when I’m on client site its not always accessible and given how often I end up writing this damn thing I figured I’d just make it easy on myself ...
    Posted to Jamie Thomson (Weblog) by jamiet on September 16, 2010
  • sys2 scripts updated

    I’ve updated my “sys2” scripts with three 3 new scripts: sys2.objects_dependencies A wrapper around sys.sql_expression_dependencies that shows also related informations taken from sys.object table, like object name, object type and schema name of the referencing entity. sys2.objects_partition_ranges Shows information on partitioned ...
    Posted to Davide Mauri (Weblog) by manowar on January 7, 2010
  • Standard Point-in-time and time-interval representations

    One requirement in any database implementation that I have ever worked on is that the notion of a point-in-time has to be represented in some way. The tool that I use on a regular basis, SQL Server, provides numerous datatypes that aid in the representation of a point-in-time and I’m sure that most people reading this will be au fait with them. ...
    Posted to Jamie Thomson (Weblog) by jamiet on December 28, 2009
  • Unambiguous date formats : T-SQL Tuesday #001

    One of the most commonly used data types in SQL Server is [datetime] which unfortunately has some vagaries around how values get casted. A typical method for defining a [datetime] literal is to write it as a character string and then cast it appropriately. The cast syntax looks something like this: DECLARE @dt ...
    Posted to Jamie Thomson (Weblog) by jamiet on December 8, 2009
  • Temporary procedures : T-SQL

    I found out about a tiny feature in SQL Server today that I never knew about and Mladen Prajdic persuaded me to blog about it. So here it is! I suspect that most people reading this know that its possible to create temporary tables in SQL Server, right? It usually goes something like this: SELECT    ...
    Posted to Jamie Thomson (Weblog) by jamiet on November 25, 2009
Privacy Statement