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 "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...
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...
11

The Magic Alt Button

Lately I have been using more and more the awesomeness of the Alt-button in SQL Server Management Studio (SSMS). What do I mean with this? While holding the Alt-button on your keyboard, you can select a block of text instead of lines of text. Note that this is not an exclusive feature, you can do […]

Read More...
2

Deploying Database Changes with PowerShell

Recently, while working on a personal project, I found myself needing a lightweight way to deploy database changes to multiple environments. In the past I have used a wide range of methods, ranging from applying the changes manually to applying changes via a diff tool (SQL Compare), to automatically applying manually created change scripts, to automatically applying diff scripts that were automatically generated, to working directly in production..er, pretend you didn’t see that one.

Read More...
1

Triggers affect on SQL System Variables

A while back I ran into an issue where a user was complaining about @@IDENTITY not always returning the value they expected.

Read More...
3

Using SELECT * in views gotcha

If ever a DBA walked up a mountain and came back down with two stones that had 10 commandments written on them, “thou shalt not use SELECT *” would be one of them.
However, that same DBA would turn around and within 5 minutes use it themselves!

Read More...
1

SSRS – Linking one report to another report

When creating reports, I try to keep them simple, clean and with as little information as possible.

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...
0

Diagnostic Manager – Alert Statuses

As you might imagine, I rely on Idera’s Diagnostic Manager quite a bit. Diagnostic Manager monitors many different things within each SQL Instance will alert to them when they met the thresholds you configure. Now if you only a few SQL Instances monit…

Read More...
Next Page »