Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
396 views
in Technique[技术] by (71.8m points)

data warehouse - How do I replace "?" with NULL in SSIS expression?

There are ? in my data columns and I have to replace them with NULL.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

if a question mark is in the column already it must be some kind of string.

Use a derived column and a if function:

[colName] == "?" ? NULL(DT_STR, ?length?, 1252) : [colName]

or

[colName] == "?" ? NULL(DT_WSTR, ?length?) : [colName]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...