SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Sam Vanga

Sam Vanga helps business people solve their data problems and enables them make data-driven-decisions. His specialties include data integration, data warehouse and database development, and BI design. Sam blogs at http://SamuelVanga.com.

Archives: November 2011

Start Documenting Your Day! Why Now?

I read a post about documenting your day by Steve Jones, here is where culture insists i write a few words about the person i refer to. But you don’t expect that for Steve. Do you?

In this short post, I’ll present my view on why you should document your… Read more

0 comments, 1,332 reads

Posted in Sam Vanga on 30 November 2011

New string function in SQL Server 2012 – FORMAT()

Formatting numbers in an SSRS report is a common task. For example, you may want to format a number as currency or percentage.

You can select a format from the number page of the properties window.

You can let sql handle the formatting, so data in the result set is… Read more

0 comments, 3,067 reads

Posted in Sam Vanga on 29 November 2011

SSAS Processing Mode (Lazy Aggregations)

Processing mode property of a partition/measure group determines how partitions will be available to users.

Processing mode has two possible options.

  • Regular. This is the default setting. When set to regular, partitions will be available to users after data has been loaded and aggregations are created completely.
  • Lazy Aggregations

Read more

0 comments, 2,976 reads

Posted in Sam Vanga on 21 November 2011

Create Sparklines in SSRS

When creating a SSRS report, you want to add lines that display trends. Sparklines that were introduced in SQL Server 2008 R2 will allow you to do this easily. But wait there is more. You want to show trends for more than one data point. For example actual sales and… Read more

3 comments, 3,562 reads

Posted in Sam Vanga on 14 November 2011

#SSRS error – An item with the same key has already been added

Here is a simple yet annoying error I ran into while creating a dataset. Below is the query that I was using and it would run just fine when executed from management studio.

CalendarYear Yr
, CalendarMonthNum Mth
, CalendarMonthName Mth
dbo.Orders o

But SSRS doesn’t like those…

Read more

5 comments, 2,042 reads

Posted in Sam Vanga on 10 November 2011

Column alias in order by and where

If you ever wonder why column alias can be used in order by and not in where clause, it’s the logical query processing order. Pinal Dave blogged about the complete order here.

Name n, GroupName g
FROM  HumanResources.Department D
WHERE g = 'Executive General and Administration'

In… Read more

1 comments, 3,008 reads

Posted in Sam Vanga on 8 November 2011

BI Pyramid (read categories of users in a BI solution)

Purpose of any business intelligence solution is to provide users information and enable them to make intelligent decisions that benefit their business. But one size solution doesn’t fit all.

Depending on their job duties and where they fall in the management chain, users can be categorized into at least three… Read more

0 comments, 739 reads

Posted in Sam Vanga on 1 November 2011