TDP Automation - Loop/Email Activity


I have a loop activity set to send emails. In the email body, I have the following variables:


If any one of those variables are NULL or have only a SPACE, the script errors out with the message: Email_1 - Unable to cast object of type ‘System.DBNull’ to type ‘System.String’.

The data is from Oracle.

Any thoughts?

Change your query to use NVL function or equivelent to get rid of nulls and give better default value.

I tried NVL and Case… same error. However, it worked with Decode with a ‘space’ to replace null value.


Odd, but your work around sounds good.