I have an SSIS package that has a step that creates a temp table using a Execute SQL Task.
Inside of this query I have a case statement that is something like:
Cast(Case
When billing_address is Like '%DONOTUSE%' Then 1
When billing_address is Like '%DONTUSE%' Then 1
Else 0
End as nvarchar)DoNotUseAccounts
I have an update statement in a different Execute SQL Task that is like this:
Update #StatementAccounts
Set Issues = Issues + ' - Do Not Use Account'
Where Product In ('prod1','prod2','prod3','prod4')
And DoNotUseCustomer= 1
When executing the package I am receiving an error: "Error: String or binary data would be truncated."
Am I using the wrong data type?
Does the Update statement need to be cast/converted as well?
Any guidance would be helpful.
I have tried using datatype int, numeric, and Casting the update statement as an int as well.