0
votes

Hi this is my first time trying to write a complicated derived column expression. I'm not sure what the problem is as it's a pretty generic error message which doesn't help much,

The expression is:

If( [conv_Status] ==10 && [conv_Agreed] == TRUE && [conv_Unagreed] == TRUE) ([conv_Status] == 15) ELSE ([conv_Status] == [conv_Status])

And the Error message is as below:

Error at tblDetail [Derived Column [143]]: Attempt to parse the expression "If( [conv_Status] ==10 & [conv_Agreed] == TRUE & [conv_Unagreed] == TRUE) ([conv_Status] == 15) ELSE([conv_Status] == [conv_Status])" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis.

Error at tblDetail [Derived Column [143]]: Cannot parse the expression "If( [conv_Status] ==10 & [conv_Agreed] == TRUE & [conv_Unagreed] == TRUE) ([conv_Status] == 15) ELSE([conv_Status] == [conv_Status])". The expression was not valid, or there is an out-of-memory error.

Error at tblDetail [Derived Column [143]]: The expression "If( [conv_Status] ==10 & [conv_Agreed] == TRUE & [conv_Unagreed] == TRUE) ([conv_Status] == 15) ELSE([conv_Status] == [conv_Status])" on "Derived Column.Inputs[Derived Column Input].Columns[conv_Status]" is not valid.

Error at tblDetail [Derived Column [143]]: Failed to set property "Expression" on "Derived Column.Inputs[Derived Column Input].Columns[conv_Status]".

Thank you

2
is this SSIS or SSRS? - TYY
I am working with SSIS - Andrew Kilburn

2 Answers

1
votes

This is the answer:

conv_Status == 10 && conv_Agreed ==  FALSE  && conv_Unagreed ==  TRUE  ? 15 : conv_Status
0
votes
... ([conv_Status] = 15) ELSE ([conv_Status] = [conv_Status])

I believe you want an assignment '=' in these, not comparison '=='.