Data Update Time

How to solve “Unknown Update time” error after adding a time of the last data refresh (a time stamp) to a view in a Tableau dashboard

In Tableau Desktop you can add last data refresh time / Update time (a time stamp) to the top of the view with following the below steps: Open your workbook and navigate to the sheet for which you would like to display the time of the last data refresh. Select Worksheet > Show Title. Double-click the title. In...Continue reading

select Second Nth highest value

11 different ways to select Second / Nth highest value in MS SQL Server Instance

Let’s discuss 11 different ways to select second highest value in MS SQL table. And as a bonus, 6 different ways to select the Nth highest value. I will be using a table called WorkOrder with three columns in it; WorkOrderID, ProductID, OrderQty. Here is a quick look to our table: WorkOrderID   ProductID   OrderQty 1   ...

ROLLUP in ‘Group By’ aggregate function

How to use ROLLUP in ‘Group By’ aggregate function in SQL Server Instance

The SQL Server GROUP BY ROLLUP is an extension of the GROUP BY clause that creates a group for each combination and adds results into sub-totals and grand totals. ROLLUP does not create all possible grouping sets based on the dimension columns. When generating the grouping sets, ROLLUP assumes a hierarchy among the dimension columns...Continue reading

Install SQL Server 2016 Service Pack 2 (SP2) and Cumulative Update 11 (CU11) Builds

How to Install SQL Server 2016 Service Pack 2 (SP2) and Cumulative Update 11 (CU11) Builds

Microsoft usually releases SP’s and CU’s to fix hundreds of bugs after the initial releases of the SQL Server 2016 RTM, and they have also has been adding a significant number of product improvements and new features after the RTM release. So, in my opinion each SQL Server SP’s and CU’s are very important hotfixes...Continue reading

list table names with undocumented sp_MSforeachdb Procedure

How to list all the table names in all the databases using undocumented Stored Procedure ‘sp_MSforeachdb’ of a SQL Server Instance

There are times when I find myself needing to run a SQL command against each database on one of my SQL Server instances. There is a handy undocumented and not officially supported stored procedure that allows you to do this without needing to set up a cursor against your sysdatabase tables on the master database:...Continue reading

Scroll to top