SSIS Derived Column transformation REPLACE and CAST in one expression

I need to replace and cast the data in a data set column and would like to do this using the Derived Column Transformation. I know how to do it with multiple derived column and a data conversion task how I believe it should be possible with a single derived column task.

The challange is that the columns contain the following DT_STR values:
 - No
 - Yes
 - No Value
and I would like to replace these with a simple boolean to safe space in my DB

I know I need to do something like this:

(DT_BOOL) REPLACE(beta, "No Value", "")

However that doesn't cover the No/Yes conversion to boolean.
tekkie2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Reza RadConsultant, TrainerCommented:
add two derived column tranformation,
in first one, replace all "No Value" s with null
in second one,replace all "Yes' s with true, and "No" s with false.

does it make sense to you?


0
Reza RadConsultant, TrainerCommented:
you can also use only one derived column transformation, with this expression:
beta == "No Value" ? NULL(DT_BOOL) : (beta == "Yes" ?  TRUE  :  FALSE )


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.