Posts

Showing posts from July, 2014

CTE - Limitations

Hi Wanted to explore one of the major limitation of CTE in sql 2012 i.e. it cannot be used inside if else statement . This is something basic as the definition of cte that it must be followed by a select, insert, update or delete statement. That is we cannot have following condition:- with cte ( ) if select cte else select cte end Thanks

Bug In ado.net enumerator in foreach loop in SSIS 2012

Hi Greetings to everyone, Today I am going to report a bug in SSIS 2012. In one of the packages I was using execute sql task and then using ado.net foreach loop enumerator. My execute sql task had a simple select statement like - 'select c1,c2,c3 from table' where c1,c2,c3 were integer columns. Based on the rows returned I was running foreach loop container and assigning values from the columns to the variables of datatype Int32 inside SSIS package. However on executing the package it was returning an error message such as Error: The type of the value (Int32) being assigned to variable "User::result1" differs from the current variable type (Int64). Variables may not change type during execution. Variable types are strict, except for variables of type Object. While researching I found that this is a bug in ssis - http://connect.microsoft.com/SQLServer/feedback/details/732413/foreach-ado-enumerator-returns-error-when-bigint-and-int64-are-used Solution -