Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

Browsing "t-sql"

11

Solving a slow running query issue with UNION

That’s right! I will solve a performance issue by adding a UNION into the query. Interested? Read on! I recently encountered a curious issue with a query. The query itself wasn’t exactly rocket science: it read data from a few tables and calculated the start and the end dates of a contract in the SELECT […]

Read More...
4

Beware the defaults! (in windowing functions) – The Movie!

I was recently contacted by the fine gents of Webucator, an online training services provider. In order to promote their SQL Server classes, they are doing a free series called SQL Server Solutions from the Web where they show different SQL Server solutions found in blog posts around the web. Essentially, they are turning blog posts […]

Read More...
5

Beware the defaults! (in windowing functions)

Some time ago I was writing some windowing functions on a set of data. Basically I was looking for the last date an event had occurred for each type of event. Let’s illustrate with an example: T-SQL1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 CREATE TABLE dbo.TestOver   […]

Read More...
0

Why avoiding multiple code blocks in a Stored Procedure

It was a little remark from Bob Beauchemin (B|T) during the Belgian SQL Server Days that started me writing this post.
Showing cached Execution Plans
In this post I’m going to use information from the following Dynamic Management Views and Functions t…

Read More...
2

Scripts to Detect Data Warehouse Issues

Standards and best practices are like flu shots you take before you’re infected; Database best practices protect your databases from bad things. But, we all make mistakes. It could be because we’re on a time crunch, or we’re lazy (which I’m guilty of by…

Read More...
3

T-SQL Tuesday #38 – Resolving an SSIS package performance problem

This is my contribution to T-SQL Tuesday #38: Standing Firm. I describe how I resolved an SSIS package performance issue.

Read More...
3

Why you shouldn’t use SELECT *

A customer’s DBA team created a checklist for the development teams with some best practices for writing proper T-SQL and asked me to write some contributions for their tips document library. So if I do the research and write the documents I might as we…

Read More...
0

Dealing with the Column name ‘TEXT()’ contains an invalid XML identifier as required by FOR XML; ‘(‘(0×0028) is the first character at fault error

I had to deploy a user defined function I was given yesterday, when I tried to I got the following error

Msg 6850, Level 16, State 1, Procedure fnGetBooks, Line 8
Column name ‘TEXT()’ contains an invalid XML identifier as required by FOR XML; ‘(‘(0x…

Read More...
2

SQL Advent 2012 Day 4: Triggers, what to do, what not to do

This is day four of the SQL Advent 2012 series of blog posts. Today we are going to look at triggers. Triggers are a great way to keep your database in a consistent state. There are two types of triggers, DML triggers and DLL triggers. DML triggers res…

Read More...
2

SQL Advent 2012 Day 3: Sargable Queries

This is day three of the SQL Advent 2012 series of blog posts. Today we are going to look at sargable queries. You might ask yourself, what is this weird term sargable. Sargable comes from searchable argument, sometimes also referred as Search ARGument…

Read More...
Next Page »