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

    SQL Server, Data Warehousing1 Nov 2026 · new
    new
  2. 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.

    HTML Reporting, SQL Server28 Oct 2026 · new
    new
  3. 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.

    SQL Server, Data Warehousing28 Oct 2026 · new
    new
  4. 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 ( ...

    SQL Server16 Jun 2026 · 1.1k reads
    1.1k
  5. 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 . ...

    SQL Server25 Jun 2025 · 1.9k reads
    1.9k
  6. 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 ...

    SQL Server6 Jun 2025 · 3.5k reads
    3.5k
  7. 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 ...

    SQL Server5 Jun 2025 · 1.9k reads
    1.9k
  8. 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 ...

    SQL Server5 Jun 2025 · 1.8k reads
    1.8k
  9. 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 ...

    SQL Server5 Jun 2025 · 1.8k reads
    1.8k
  10. 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 ...

    SQL Server, Data Warehousing27 Jan 2025 · 6.3k reads
    6.3k
  11. 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 ...

    SQL Server12 Jun 2023 · 3.8k reads
    3.8k
  12. 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 ...

    SQL Server12 Jun 2023 · 5.2k reads
    5.2k
  13. 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 ...

    SQL Server12 Jun 2023 · 2.7k reads
    2.7k
  14. 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 ...

    SQL Server12 Jun 2023 · 5.2k reads
    5.2k
  15. 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 ...

    SQL Server12 Jun 2023 · 4.1k reads
    4.1k
  16. 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 ...

    SQL Server12 Jun 2023 · 2.7k reads
    2.7k
  17. 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 ...

    SQL Server12 Jun 2023 · 2.8k reads
    2.8k
  18. 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 ...

    SQL Server12 Jun 2023 · 3k reads
    3k
  19. 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 ...

    SQL Server5 Jun 2023 · 1.9k reads
    1.9k
  20. 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 ...

    SQL Server8 Apr 2022 · 13.1k reads
    13.1k
  21. 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 ...

    SQL Server20 Mar 2019 · 5.7k reads
    5.7k
  22. 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 ...

    SQL Server, Power BI1 comment7 Nov 2017 · 34.8k reads
    34.8k
  23. 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 ...

    SQL Server1 comment14 Sep 2017 · 14.6k reads
    14.6k
  24. 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 ...

    SQL Server12 Sep 2017 · 25.5k reads
    25.5k
  25. 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 ...

    SQL Server8 Sep 2017 · 9.6k reads
    9.6k
  26. 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 ...

    SQL Server7 Sep 2017 · 16.4k reads
    16.4k
  27. 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. ...

    SQL Server2 Jul 2016 · 9.8k reads
    9.8k
  28. 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 ...

    SQL Server29 comments10 Mar 2016 · 136.6k reads
    136.6k
  29. 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 ...

    SQL Server8 Feb 2016 · 20.5k reads
    20.5k
  30. 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.

    SQL Server5 Feb 2016 · 10.1k reads
    10.1k
  31. 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 ...

    SQL Server3 Feb 2016 · 36.5k reads
    36.5k
  32. 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 ...

    SQL Server3 comments2 Feb 2016 · 11.7k reads
    11.7k
  33. 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.

    SQL Server, Power BI7 Dec 2015 · 7.4k reads
    7.4k
  34. 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 ...

    SQL Server29 Jul 2015 · 7.5k reads
    7.5k
  35. 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 ...

    SQL Server20 Aug 2014 · 5.7k reads
    5.7k
  36. 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 ...

    SQL Server3 Mar 2014 · 4.4k reads
    4.4k
  37. 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 ...

    SQL Server26 Feb 2014 · 4.1k reads
    4.1k
  38. 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 ...

    SQL Server, Power BI12 comments10 Oct 2013 · 49.1k reads
    49.1k
  39. 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 ...

    SQL Server1 comment9 Oct 2013 · 6.3k reads
    6.3k
  40. 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 ...

    SQL Server27 Mar 2013 · 4.2k reads
    4.2k
  41. 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 ...

    SQL Server1 comment6 Nov 2012 · 4.7k reads
    4.7k
  42. 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 ...

    SQL Server29 Aug 2012 · 6.8k reads
    6.8k
  43. 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.

    SQL Server29 Aug 2012 · 4.9k reads
    4.9k
  44. 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! ...

    SQL Server1 comment23 Aug 2012 · 4.3k reads
    4.3k
  45. 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 ...

    SQL Server, Power BI29 Jun 2012 · 6.7k reads
    6.7k
  46. 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 ...

    SQL Server6 Jun 2012 · 12.5k reads
    12.5k
  47. 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 ...

    SQL Server3 comments24 May 2012 · 5.7k reads
    5.7k
  48. 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". ...

    SQL Server14 May 2012 · 4k reads
    4k
  49. 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.

    SQL Server14 May 2012 · 4.2k reads
    4.2k
  50. 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 ...

    SQL Server1 comment30 Mar 2012 · 50.2k reads
    50.2k
  51. 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 ( ...

    SQL Server26 Mar 2012 · 4.2k reads
    4.2k
  52. 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 ...

    SQL Server, Data Warehousing21 Mar 2012 · 9.7k reads
    9.7k
  53. 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 ...

    SQL Server24 May 2011 · 5.3k reads
    5.3k
  54. 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 ...

    SQL Server, Data Warehousing4 Nov 2010 · 9k reads
    9k
  55. 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 ...

    SQL Server21 Apr 2010 · 4.6k reads
    4.6k
  56. 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 ...

    SQL Server3 Mar 2010 · 3.9k reads
    3.9k
  57. 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 ...

    SQL Server30 Jun 2009 · 6.2k reads
    6.2k
  58. 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 ...

    SQL Server26 Feb 2009 · 3.7k reads
    3.7k
  59. 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 ...

    SQL Server24 Feb 2009 · 3.4k reads
    3.4k
  60. 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 ...

    SQL Server9 comments24 Feb 2009 · 12.4k reads
    12.4k
  61. 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 ...

    SQL Server17 Dec 2008 · 4.2k reads
    4.2k
  62. 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 ...

    SQL Server15 Dec 2008 · 3.5k reads
    3.5k
  63. 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 ...

    SQL Server8 Dec 2008 · 3.6k reads
    3.6k
  64. 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 ...

    SQL Server2 comments5 Dec 2008 · 20.3k reads
    20.3k
  65. 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 ...

    SQL Server2 Dec 2008 · 9.5k reads
    9.5k
  66. 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 ...

    SQL Server7 Nov 2008 · 4.7k reads
    4.7k
  67. 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 ...

    SQL Server17 Sep 2008 · 3.3k reads
    3.3k
  68. 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 ...

    SQL Server26 Feb 2008 · 7.4k reads
    7.4k
  69. 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 ...

    SQL Server23 Jan 2008 · 18.6k reads
    18.6k
(69 rows affected)sqlblog.nl