SSIS Derived Column showing anerror saying out of memory

22 views Asked by At

The Below Derived Column is showing error in SSIS

CASE TRIM(UPPER(IssueReviewYN)) WHEN "YES" THEN 0 WHEN "N/A" THEN 0 ELSE 1 END

Is there anything i am missing?

1

There are 1 answers

0
billinkc On

The reason the expression is showing an error is you have valid TSQL but a Derived Column uses the SSIS Expression language which is not SQL.

You're looking for the ternary operator

(test) ? trueCase : falseCase

You are looking for something along the lines of

(TRIM(UPPER(IssueReviewYN)) == "YES" || TRIM(UPPER(IssueReviewYN)) == "N/A") ? 0 : 1

Pseudo logic: if the uppercased and trimmed value of IssueReviewYN is YES or N/A then use 0; else 1