sql - Convert NULL value to blank string in SSIS -


as title says i'm trying convert null values empty strings. i'm using following code:

isnull((dt_wstr,10,1252)[serial no.])?"" : (dt_wstr,10,1252)[serial no.] 

it returns: enter image description here

i've tried several similar solutions above, returns same.

update: why need this. got 4 columns (serial no. included), need combine 1 column, done in derived column: ((dt_str,150,1252)([col1]) + (dt_str,150,1252)([col2]) + (dt_str,150,1252)([serial no.]) + (dt_str,150,1252)(col4))

in case 1 of these null, combined : null. therefore can't used in lookup next step.

i think issue type cast inside isnull() statement: try this.

(dt_str, 150, 1252) (isnull([serial no.]) ? "" :  [serial no.])  

if doesn't work, try no casting statements @ all:

(isnull([serial no.]) ? "" :  [serial no.])  

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -