THE SQL Server Blog Spot on the Web

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

Browse by Tags

All Tags » T-SQL » SQL Server   (RSS)
Showing page 4 of 6 (54 total posts)
  • System Variables, Stored Procedures or Functions for Meta Data

    Whenever you want to know something about SQL Server’s configuration, whether that’s the Instance itself or a database, you have a few options. If you want to know “dynamic” data, such as how much memory or CPU is consumed or what a particular query is doing, you should be using the Dynamic Management Views (DMVs) that you can read about here: ...
    Posted to Buck Woody (Weblog) by BuckWoody on March 11, 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
  • Code that Writes Code

    I have scripts that re-create my databases for testing and development purposes. But sometimes I want to take the data from a set of tables and move it as well – I could use SSIS, or a SELECT INTO statement, but what if I want to “re-set” the data to a point in time? In other words, load it with some “base data”? I thought this might be a good ...
    Posted to Buck Woody (Weblog) by BuckWoody on November 25, 2009
  • SET IDENTITY_INSERT little bug(?)

    While I was working on a package to incrementally load a dimension in the DWH I’m developing for a customer, I stumbled upon a tricky little bug (I think, I still have to have a response from MS) that had – and will have – a little impact on how I create my packages. I’ve found that, when working on an empty table that has an identity column, if ...
    Posted to Davide Mauri (Weblog) by manowar on September 30, 2009
  • Extracting insert, update, delete rowcounts from T-SQL MERGE

    Just lately I’ve been using T-SQL’s MERGE statement (introduced in SQL Server 2008) and one thing that I needed to do was extract rowcounts for each DML operation (i.e. INSERT, UPDATE, DELETE) conducted by a MERGE. I was surprised to find that while @@ROWCOUNT is supported for MERGE, it only returns the total number of affected rows and there are ...
    Posted to Jamie Thomson (Weblog) by jamiet on August 29, 2009
  • 2008: Declaring and instantiating a value

    Ok, I admit it.  Sometimes the least important things are the most fun.  As I try to get my blog back up and kicking again after a few months of holiday fun coupled with some dreary personal life things (a death in the family and lots of sickness/busyness, mostly,) I felt the need to write about another little time saving feature that ...
    Posted to Louis Davidson (Weblog) by drsql on March 1, 2008
  • 2008: Rebuilding a Heap

    In 2005, rebuilding a table that was a heap (no clustered index) wasn't easy.  You could copy it to a different table, or you could add a clustered index and then drop it. In 2008, this is a far easier thing to do.  They have added to the ALTER TABLE command a method to rebuild the table, which is the same as rebuilding the clustered ...
    Posted to Louis Davidson (Weblog) by drsql on February 26, 2008
Privacy Statement