Recent Posts

Free e-book: Introducing Microsoft Power BI

Get started quickly with Microsoft Power BI! Experts Alberto Ferrari and Marco Russo will help you bring your data to life, transforming your company’s data into rich visuals for you to collect and organize, allowing you to focus on what matters most to you. Stay in the know, spot trends …

Read More »

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. The SMTP server (local) was working fine but database mail refuses to work!

Read More »
Nederlandse postcodetabel

Postcodetabel van Nederlands + SQL Script

Inleiding De Nederlandse Postcodetabel bevat informatie over alle postcodes die in Nederland bekend zijn. Dit is erg handig als je meer informatie wilt over een bepaalde postcode zoals een geografische locatie of de plaats die bij een postcode hoort. We laten in dit artikel zien wat je met deze postcodes …

Read More »
sp_send_dbmail attachment

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 using sp_send_dbmail attachment options, you can automate this process.

Read More »

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 directly on a database on another machine. In Oracle they call it DBLinks (Database Links).

Read More »

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 to this. SQL Functions are performing very slow, especially …

Read More »
Calculate Lost Customers in SQL

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 business with them. In this article, I will help you to create SQL to calculate this …

Read More »
Slowest_SQL_Queries

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 queries from an instance, or database perspective.   The number of records shown, the database, and the sort order are identified by …

Read More »

Interesting Course about data visualisation from Google

Making Sense of Data   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 applying it in different ways? This self-paced, online course is intended for anyone who …

Read More »

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 done using a T-SQL Statement like this: CONVERT(nvarchar(64), EindDatum-StartDatum, 108) AS DurationCONVERT(nvarchar(64), EindDatum-StartDatum, 108) AS …

Read More »