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