- new
Microsoft MDS end of life: your options before 2028
Microsoft removed Master Data Services from SQL Server 2025, and SQL Server 2022 mainstream support ends on 11 January 2028. What that means for your MDS models, and how the alternatives compare.
- new
Service areas per branch on the postcode map: who serves which postcode?
A table with postcode ranges per branch, on a map of all 4,071 postcode areas. With the T-SQL that finds gaps, overlaps and areas assigned to the wrong branch.
- new
Faster AS400 loads into SQL Server: one column per row
How we cut the fetch of 361,899 IBM i rows from 487 seconds to 57 to 95 seconds by packing 76 columns into one string, and how we kept it safe.
- 1.1k
When a PBIX won't upload to Report Server: a PBIR round-trip gone wrong
I lost an afternoon to this one, so here it is in case it saves someone else the same trip. The setup is an on-prem Power BI Report Server, fully patched, running the May 2026 release ( ...
- 1.9k
Quickly Reorder MDS Attributes Using SQL Updates
If you've ever used Microsoft Master Data Services (MDS), you've probably noticed one of its more annoying limitations: there’s no drag-and-drop interface to reorder attributes within an entity . ...
- 3.5k
Keeping Your SQL Server Statistics Fresh: A Guide to Optimal Database Performance
If you've ever wondered why your perfectly tuned SQL query suddenly starts crawling at a snail's pace, the culprit might be stale statistics. In SQL Server, statistics are like the GPS system for ...
- 1.9k
Build your own brain with MyGPT: metadata, logic and answers at your fingertips
We all know it: you have built up years of knowledge about your data warehouse, the logic of procedures, the structure of your reports and the how and why of all kinds of column names. But it is either ...
- 1.8k
AI as your SQL sidekick: how ChatGPT and Claude make your code faster and better
Anyone who writes SQL regularly knows there are three kinds of queries: The quick one-line selects, The 'just tinker a bit' report queries, And the real brain teasers with 8 joins, subselects and ...
- 1.8k
Using Claude to write SQL queries: blessing or trap?
In recent years, Large Language Models (LLMs) such as GPT from OpenAI and Claude from Anthropic have become better and better at understanding and generating code. Where you used to sit puzzling ...
- 6.3k
How to Truncate All Tables in a Database While Preserving Foreign Keys: A Complete Script
When testing a data warehouse , a common challenge is managing large datasets effectively. Often, you need to reset tables to a clean state, ensuring consistent testing environments. The most ...
- 3.8k
Advanced T-SQL Window Functions: A Comprehensive Guide with Examples
Title: Advanced T-SQL Window Functions: A Comprehensive Guide with Examples Introduction Transact-SQL (T-SQL), Microsoft's proprietary extension of the SQL language, provides a rich set of tools for ...
- 5.2k
Top 5 Ways to Optimize Your SQL Server CPU Usage
Introduction SQL Server is a powerful relational database management system developed by Microsoft. It is widely used in various industries for data storage, processing, and retrieval. However, like ...
- 2.7k
Get the Most out of Customer Data with a Postcode Table: Your Guide to Successful Data Analysis
A postcode table is basically a database of all postcodes in a certain country, in this case the Netherlands. It holds not only the postcodes themselves, but often also other useful data such as ...
- 5.2k
SQL Server Disk Performance Metrics: An In-depth Guide
Understanding your SQL Server's disk performance metrics is crucial for maintaining an efficient, high-performing database. These metrics provide insights into how well your storage system is ...
- 4.1k
10 Common Mistakes in SQL Server Performance Optimization and How to Avoid Them
Sure, here is a draft for the blog post: Microsoft SQL Server is a powerful, robust and feature-rich relational database management system (RDBMS). Despite its capabilities, improper usage or ...
- 2.7k
Unleashing the Power of Data: How Industry Leaders Implement Microsoft Power BI
Introduction Microsoft Power BI is a suite of business analytics tools that enables organizations to analyze data and share insights. Through its comprehensive dashboards, interactive reports, and ...
- 2.8k
From Excel to Power BI: Transitioning to Advanced Analytics
Over the past few decades, Excel has firmly established itself as a cornerstone of data management, manipulation, and visualization. However, in the evolving world of data analytics, tools like ...
- 3k
Making Sense of Time: An Introduction to SQL Server's DateTime Functions
When it comes to managing and manipulating data, there's no doubt that SQL Server is one of the most popular choices. One of the reasons for its popularity is the rich set of functions it provides ...
- 1.9k
Postcode Tables in Databases and Power BI: Linking Geographic Information to Business Performance
In data analysis and business intelligence it is essential to understand not only numbers and statistics, but also the geographic context of that data. This is where the ...
- 13.1k
Making active bold buttons in Power BI
When you work with buttons in Power BI, for example to work with bookmarks, it is useful to see which "view" is active in your report. It is a bit like the idea of web ...
- 5.7k
DAX Set column to Zero based on Username()
I was looking for a formule to reset a column in my tabular model to zero based on the user who is logged in. This is quick workaround. In SSAS Tabular 2016, it's impossible to hide columns. We are ...
- 34.8k
Enrich customer data with the postal code table
In a previous article we talked briefly about what you can do with the postal code table of the Netherlands. You can use a postal code table to fill in data on your website automatically. Enriching customer data ...
- 14.6k
The 5 best examples Of Big Data in real life
One thing that is definitely taking the world by storm is Big Data. It is considered highly imperative for big to small industries and businesses. Companies have started to embrace the fact that big ...
- 25.5k
Top 3 of the Best ETL tools in the Market in 2017
It's pretty hard to say "best etl tools" or "single best etl tools" to recommend. ETL-tools are very often closely related to the ERP or database product in use at an organization. As an IT ...
- 9.6k
SQL Server Optimize Insert Performance In 5 Steps
SQL Server Optimize Insert Performance In 5 Steps. What are the possible reasons of the slow table insert? What are ways to identify this bottleneck without the execution plan? DROP ALL triggers and ...
- 16.4k
Cannot truncate table because it is being referenced by a FOREIGN KEY constraint
Using Microsoft SQL Server, you cannot truncate or drop a table with a foreign key constraint. For example, when you have a client table and a country table. When the client table has a foreign key ...
- 9.8k
SQL 2016 Database Mail not working
I was struggling with my SQL Server 2016 database mail after installing the Free Developer edition of Sql Server 2016. My server contains Microsoft Windows Server 2012 and I enabled the SMTP server. ...
- 136.6k
Postcode table of the Netherlands + SQL Script
The Dutch postcode table holds information about all postcodes known in the Netherlands. This is very useful when you want more information about a certain postcode, such as a geographic location ...
- 20.5k
Setup sp_send_dbmail attachment included!
I need to setup a weekly report for one of my customers. The report can be manually run by executing a T-SQL statement and copy the result to Excel. After copying, it's emailed to the client. By ...
- 10.1k
Free E-Book SQL Server 2016
The second preview of Microsoft SQL Server 2016 "Mission-Critical Applications, Deeper Insights, Hyperscale Cloud" is available for download.
- 36.5k
Linked Server - Why and how use them!
A linked server is used to connect to another (remote) database or file (Xls, CVX) using SQL Server Management Studio (SSMS) and discover the data or objects. You can write SQL queries from your SSMS ...
- 11.7k
Calculate Age in SQL Server
In my daily work, I need to calculate and report the age of people very often. There are a couple of ways to calculate the age and will give you the right result. I do not recommend a SQL Function to ...
- 7.4k
T-TSQL - Create 4 week Moving Total
This article will offer you a way to calculate a 4 week moving total in SQL using SQL Server. There are more ways to Rome but this is a way you can use to calculate it using a date dimension.
- 7.5k
Split a postcode range into separate records
One requirement might be to show market coverage within the Netherlands on a map. The postcode areas of the Netherlands are divided by region. A region in turn can consist of ranges with ...
- 5.7k
Calculate Lost Customers using T-SQL
A common question in the Business Intelligence world from customers is "how many customers did we lose this year" ? Businesses wants to know this so they can act faster to keep customers doing ...
- 4.4k
How To Find the slowest SQL Queries
This stored procedure displays the top worst performing queries based on CPU, Execution Count, I/O and Elapsed_Time as identified using DMV information. This can be display the worst performing ...
- 4.1k
Interesting Course about data visualisation from Google
Do you work with surveys, demographic information, evaluation data, test scores, or observation data? Are you interested in making the data you collect more useful by organizing it, analyzing it, and ...
- 49.1k
How to Refresh Reporting Services Cache?
I am working for a client which uses a Datawarehouse in which the data is loaded once a day during the night. During the rest of the day, nothing changes in the datawarehouse. After a couple of ...
- 6.3k
Calculate time in hours and minutes between two dates
Sounds easy right? I want to calculate the difference in hours and minutes between two dates. A good readable notition for my report. I want a format like this: 00:36:53 OR 02:13:45 This can easy be ...
- 4.2k
After update trigger
Sometimes it is useful to keep track of a modification date or modification user in a field, especially in a master data environment. You can use a trigger on a table for this. It must work both ...
- 4.7k
Calculate the nearest working day
Last week I had a nice challenge. In the KPI table I use for certain reports, only the normal working days are calculated, Monday to Friday. Public holidays are in there too. The ...
- 6.8k
Dutch public holidays in SQL Server
Sadly there is no standard function in SQL Server to check whether a date is a public holiday. To find out, it helps to use a date dimension as explained here ...
- 4.9k
Target line/StripLine in Reporting Services
In SSRS 2008 R2 you can add a target line to a chart. This is useful to show, for example, what the target is, so you can quickly see which values go over the target.
- 4.3k
Publish an Excel Pivot online
Today I found a nice article about publishing an Excel Pivot sheet online. I have not tested it myself yet, but I will definitely try it soon! ...
- 6.7k
SQL output in Excel shows millions
You will often want to copy the result of an SQL query to Excel and send it on, for example so someone can check the figures, or just as a simple list. You will then ...
- 12.5k
Calculate DateDiff With Only WeekDays or Workdays
Today, I was working on a fact table for my datawarehouse. I was looking for a function to calculate the number of " normal weekdays " between two given dates I had a record in my Dwh from a HR ...
- 5.7k
Centralizing KPIs in your data warehouse
You build brilliant reports with the best figures, revenue, productivity and KPIs. Over time more and more reports appear within the organization. Until someone suddenly notices that the ...
- 4k
Reset Ident Column in Database
This is a very handy little script to generate a script to reset the ident column of all your database tables. This can be handy after filling and truncating tables. This script uses a schema "ps". ...
- 4.2k
Script to count nr of rows in all tables
This script can be used as a view to count the number of rows in all SQL tables in your database. This can be very usefull.
- 50.2k
Calculate Weeks Between Two Dates using DateDiff
In SQL Server, there's a buildin function to calculate the number of weeks between two dates. This function is called "DateDiff". The problem with this function is that Sql Server thinks the week ...
- 4.2k
Gratis E-Book: Introducing Microsoft SQL Server 2012
Gratis e-book van Microsoft te download op deze website: Friends, the final and complete version of Introducing Microsoft SQL Server 2012 , by Ross Mistry ( @RossMistry ) and Stacia Misner ( ...
- 9.7k
Datawarehouse and Datamart - Empty Strings or NULL Values?
I was wondering what's the best method to store empty fields from source systems in a datawarehouse. For example;a customer record without a first name stored in the database. When loading this ...
- 5.3k
Calculating running totals
A lot has been written about it on the internet already, but I thought it was worth posting an article about calculating running totals in Microsoft SQL Server 2005 / 2008. There are ...
- 9k
How do I create a Period Dimension?
This blog covers the period dimension. It looks a lot like the date dimension discussed earlier (and indispensable in every data warehouse), but its function is a little different. The power of ...
- 4.6k
How do I create a time dimension?
Time dimensions, like date dimensions, are useful when you want to store the properties of a point in time for a fact. If you want to record the time of a sale, for example, you store ...
- 3.9k
Script all databases and objects
Following an earlier article about scripting your database objects, I made a stored procedure that scripts all databases for you automatically and writes the script to a ...
- 6.2k
Decrypt Stored Procedure, Views, Functions in SQL Server
Last week I had a stored procedure in my SQL database which was encrypted. On the internet, you can find a lot of (payed) tools to decrypt a stored procedure but I also found this script. This script ...
- 3.7k
T-SQL Group By ALL
When you type a T-SQL Query, you often want to group the data. Today I came across a neat trick for grouping: the GROUP BY ALL option. It may be a bit hard to explain what it ...
- 3.4k
How do I back up my database?
This article describes how you can script a Microsoft SQL Server database. This script holds the complete database structure and all objects in the database, such as functions and Stored ...
- 12.4k
How do I make a date dimension?
Date dimensions are very useful. With a date dimension / date table you can look up for any date which week it falls in, which year, which month, whether it is a public holiday ...
- 4.2k
Recursive Query with CTE II
You can think of a number of scenarios where running a recursive query can be the answer. This example covers a recursive query on a department table, so that an ...
- 3.5k
Column Usage in Views
In SQL Server 2005 you can see which columns and which tables a View uses. There is a System-View in every database for this. This view is created automatically ...
- 3.6k
Searching for text in SSIS packages
In SSIS (SQL Server Integration Services) you can search the content of the packages. This is useful when you want to know whether a column is used in a source or destination. You can ...
- 20.3k
Date calculations
In SQL Server 2005 you can do date calculations in several ways. SQL Server 2005 has several functions you can use when you work with dates. This article describes a number of ...
- 9.5k
Finding duplicate rows
Every row in a table is identified by a primary key. Now and then the key occurs twice in your system. That should not happen. With this simple query you can ...
- 4.7k
Recursive Query with CTE I
I recently ran into a problem that I found interesting enough to put on my blog. It covers a common situation where you use a dataset several times, also called a ...
- 3.3k
Parameter security when exporting to Excel
Parameter security In our environment we use an ASP.NET web portal to offer reports, which are all made in Reporting Services 2005. The security with regard ...
- 7.4k
Convert a date to an integer
In data warehouse land we use integers as primary keys for the date in our date dimension. So we store the date "2008-12-01 00:00:00.000" as "20081201". This lets you ...
- 18.6k
The 3 best ways - Find a column in a SQL database
You want to find a column in one of the tables in your SQL Server database. Your database has a few hundred tables. Expanding all the tables to look for the column can be a time-consuming job ...
(69 rows affected)
Completion time: