comparing empty strings in conditional split
hello, I am comparing source(SQL 2008 r2) and destination(DB2) in conditional split and I am dividing data in to matched and no matched outputs, when both source and destination columns are empty strings it must deviate to matched output but even though both are empty strings its showing as unmatched output, is there any way that I can resolve this issue?
May 26th, 2011 9:42pm

Hello, Please TRIM both columns and it will match, if there are Null then Replace NULL with "". Thankshttp://sqlage.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2011 11:28pm

Indeed try something like Aamir suggested: (ISNULL([Column1]) ? "" : TRIM([Column1])) == (ISNULL([Column2]) ? "" : TRIM([Column2]))Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
May 27th, 2011 2:27am

HI Please try using the Below Expression TRIM(ColumnName)=="" ? (DT_STR, 4, 1252)NULL(DT_STR, 4, 1252) : ColumnName OR ISNULL(ColumnName)||TRIM(ColumnName)==""?"Unknown": ColumnName Regards ========================= Naveen Kumar Thangaraj Naveen Kumar
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2011 7:10am

thanks for all of you guys thanks Sam
May 27th, 2011 4:02pm

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

Other recent topics Other recent topics