SQL Server SSIS – Whats the value of TRUE?

Oopps! Upgrade your browser pretty please.Oopps! Upgrade your browser pretty please.

If you use the dataflow component in SSIS to load data from one table to another and tha source columns is BIT and the target column is TINYINT, whats the value of TRUE? Well, everything not equal to 0 is true and that means that true is non-deterministic and TRUE can be any number between -256 and 256, In T-SQL, the value of TRUE = 1, but in SSIS, the value of TRUE = the maximum value of your target datatype!!! You probably expected to get the same value as in T-SQL, but no.

This is just another case where implicit conversion is nasty. Performance issues with implicit conversion are bad, but this case threathens the data quality of your database.

by Håkan Winther
Twitter: @h_winther