Top 10 Blog Posts of 2016

Posted by on Jan 4, 2017 in Power BI, SQL Server | No Comments

2016 was the year of raising Power BI in my opinion, Here is the list of top 10 blog posts that you clicked mostly in this year; How to Do Power BI Mapping with Latitude and Longitude Only. This post was written when Power BI didn’t supported latitude and longitude only for map visualization. Nowadays ...

Read More

Lag and Lead Functions in SQL Server 2012

Posted by on Sep 10, 2013 in SQL Server, T-SQL | No Comments

SQL Server 2012 has a set of useful functions to work in T-SQL environment. Lead and Lag are one of the most useful functions introduced in 2012. Lag function helps to access values from previous records, and Lead function helps to access values from next records in the data set. structure of working with these ...

Read More

T-SQL Script to get row count of all tables in the database

Posted by on Aug 18, 2013 in SQL Server, T-SQL | No Comments

Today I’ve wrote a simple script to get number of records for all tables in a database and fetch those tables that contains at least one record. This picture shows an example of result set: Here is the script: declare @tempTable table(tablename varchar(max), rowscount int,processed bit) insert into @tempTable select TABLE_NAME,0,0 from INFORMATION_SCHEMA.TABLES where TABLE_CATALOG=‘DEMO’ ...

Read More

Script for Creating and Generating members for Date Dimensions: General Purpose

Posted by on Jan 9, 2013 in Business Intelligence, ETL, SQL Server, T-SQL | No Comments

Date Dimension can be found in every Data Warehouse, because Date dimension is one of the most important factors of each operational system that users like to view reports based on date dimension. So the importance and requirement to a date dimension persuade me to write a t-sql script to generate records for date dimension. ...

Read More