Symptoms
When you execute a SQL Server 2014 Integration Services (SSIS) package on a table that contains many null values, the SSIS package may produce incorrect results in the destination columns if the following conditions are true:
-
In the package, you use Unpivot transformation to normalize the dataset in the table.
-
In the expression of the Unpivot transformation, you pivot the dataset in the table into multiple destination columns.
Specifically, if the data types of the columns are numeric data types, the null values might change to 0 (zero); if the data types of the column are string data types, the null values might change to empty strings.
Resolution
The issue was first fixed in the following cumulative update of SQL Server.
Cumulative Update 1 for SQL Server 2014 SP1 /en-us/help/3067839
Cumulative Update 8 for SQL Server 2014 /en-us/help/3067836
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Hotfix information A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.
If the hotfix is available for download, there is a "Hotfix Download Available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:http://support.microsoft.com/contactus/?ws=supportNote The "Hotfix Download Available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
References
Check out How to pivot in SSIS. Check out Working with Pivot and UnPivot Transformation.