SSIS : Concatenate NULL Field
Hi all I am trying to concatenate several field into one to save it in one column for each of my row. (I'm making an error log) My problem is that some field might be from time to time NULL... and I just found out that If a field is NULL my whole concatenation is NULL. Anybody could help me. If at least I could find a way to something like a if (isnull(myfield)) into the derivate column ... Any idea anyone ? Thanks!
August 18th, 2011 1:57pm

Hi, Use the conditional operator. Like this maybe: [Column1] + (ISNULL([Column2]) ? "" : [Column2]) + [Column3]http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
Free Windows Admin Tool Kit Click here and download it now
August 18th, 2011 2:12pm

Hi IeCLEMS, Please use as below 1. Open expression box 2. =Field!column1.value &" " & Field!column2.value &" " & Field!column3.value 3. OK Suppose Column1 has value 1 column2 has null value Column1 has value 2 It will gives result as 1 3 *Mind space between 1 and 3, it reflects NULL value. Amit Mark as answer if helpful http://fascinatingsql.wordpress.com/
August 19th, 2011 7:50am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics