Quantcast
Channel: Clint Huijbers' Blog » 2008R2
Browsing all 10 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Filter out NULL values in Indexes

Received a great tip from my colleague on how to filter out NULL values in Indexes. How to use a WHERE-clause within an Index? Well take a look! CREATE NONCLUSTERED INDEX [IX_NC_ColumnName] ON...

View Article



Image may be NSFW.
Clik here to view.

Function: Calculate working days

I stumbled upon a very nice T-SQL function to calculate working days. I’ve created one before myself, but this one is very short and slick :) This example seems to be copied multiple times (here and...

View Article

Image may be NSFW.
Clik here to view.

List columns and attributes for every table in a SQL Server database

A nice addition for your Cookbook (Code Snippets): Source sys.tables provides one row for each table in a database. This does include user tables and system tables that exist in each database. There is...

View Article

Image may be NSFW.
Clik here to view.

Stored Procedure: Automatically ‘Generate Scripts’ for local or linked server

Normally you would have done this manually: Time for a change! Schedule it in SQL Agent as a Stored Procedure and export it to a TXT-file. SP GenerateScripts on LocalServer On execution: To export it...

View Article

Image may be NSFW.
Clik here to view.

SQL Server – Rare Event error

Today I received a SQL Sever error that was caused by a ‘rare event’. Simply adding just a single parameter to the same Stored Procedure triggered this event. By removing that single parameter, I...

View Article


Image may be NSFW.
Clik here to view.

Selection of all parameter values – (All)

Another addition to your cookbook! A handy trick to simplify your report header information is by displaying ‘(All)’ instead of literary all parameter values. An example: By using this expression in...

View Article

Image may be NSFW.
Clik here to view.

SQL Monitor on CodePlex (free standalone tool)

A few days ago someone posted a link to this very nice tool on LinkedIn: SQL Live Monitor @ CodePlex Description a .NET application that provides realtime performance data on the target SQL Server...

View Article

Image may be NSFW.
Clik here to view.

SSIS: Text to ProperCase (derived column)

How to format text to ProperCasing? Found this SSIS Expression at SQLJunkieShare: (UPPER(SUBSTRING(TRIM(Name),1,1)) + TRIM(LOWER(SUBSTRING(TRIM(Name),2,FINDSTRING(TRIM(Name),” “,1) – 1 < 0 ?...

View Article


Image may be NSFW.
Clik here to view.

SSIS – No status is available (NonColumnSpecificError)

In case your SSIS package fails to insert new records into a destination table and you receive an error message like: No status is available. [NonColumnSpecificError] In my case, the Error Description...

View Article


Image may be NSFW.
Clik here to view.

From DATETIME(OFFSET) to VARCHAR(x), a world of differences :)

Always use the smallest data type, but in some cases this can really bite you. In my example, I’ve both DATETIME and DATETIMEOFFSET types in a single table. ‘Simply’ converting/casting both to strings...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images