Tag: SQL Server

  • SQL Server Dependency Browser

    SQL Server Dependency Browser

    SQL Server Dependency Browser for 2012 or later is made open source here.

    Installation: Sql2012DepSetup.exe

  • Refresh denormalized fields

    I just had to share this beautiful SQL Server query that I composed today. It refreshes denormalized fields!

    UPDATE DestinationTable SET DestinationTable.Field=SourceTable.Field
    FROM dbo.DestinationTableName AS DestinationTable
    INNER JOIN dbo.SourceTableName AS SourceTable
    ON SourceTable.PK=DestinationTable.FK

    In other words, it copies the value from one column in one table to another column in another table, where the keys match (specified after ON). Beautiful! I use Microsoft SQL Server 2008, but I’m sure this works in 2005 too.