How to get error description in SSIS dataflow

In SSIS, there is no direct method to get the error description when error occurred during data Load and transformation. We can only redirect the failed records along with Error…

Read more »

Usage of @@Error within transaction

@@ERROR returns error number of the last statement executed. When the last executed statement completed successfully, this returns 0. In case of any error, the error number will be return….

Read more »

How to find when was SQL Server restarted?

There are few ways to find out when the SQL Server was restarted, here I am going to use DMV (sys.dm_os_sys_info) to find the SQL Server restarted time.

Read more »

Table variable and Table type in transaction

The myth is to roll back the work done inside the transaction, in case of any error during the transaction. However this is not the case with the SQL Server…

Read more »

Data compression overview in SQL Server 2008

I found the Data compression feature in SQL Server 2008 is very handy. This definitely helps in optimizing query performance in terms of I/O cost and additionally it helps in…

Read more »

How to insert values into an Identity column in SQL Server

Identity is a property that can be set on a column. When an identity is enabled the column will be populated automatically by system and it will not allow user…

Read more »

Be aware when you use two digit year in date

When you execute the below query, as you expect, the result will be “September 26th 2049” Now, Lets see what happen when we pass 50 instead of 49 You will…

Read more »

How to find whether the date is end date of the month in SQL

Working with date is very interesting, I have seen people add too much code to get desired result while it can be achievable with simple logic. Below sample is to…

Read more »

How to find the Date is first day of the Week in SQL

Some time you may need to find the given date is first day of the week or not? here is the code.

Read more »

Concatenate column values from multiple rows into a single column in SQL Server

I have created a simple table to demonstrate how to concatenate the values from multiple rows in to one column. Insert some sample records in to this temporary table Once…

Read more »