I'm creating an SSIS package with BIML and I want to add an expression in my Derived Column with an Logical AND &&.
But when I check the BIML Script for errors with the 'Check Biml for Errors'-option in the context menu, I got an error: An error occurred while parsing EntityNameISNULL([Column1]) && ISNULL([Column2])
An error occurred while parsing EntityName |
When I replace it with an Logical Or || it works without errors. What's wrong?
Solution
An XML document doesn't like an ampersand (&). You have to replace it by & or enclose it with CDATA.
ISNULL([Column1]) && ISNULL([Column2]) ISNULL([Column1]) <![CDATA[&&]]> ISNULL([Column2])
Now you can build the Biml Script without errors.
I just wasted half a day troubleshooting my code, till I narrowed the problem down to the ampersands.
ReplyDeleteThank you so much for this!
This is a trivial piece but drains your brain out if it doesn't strike. Thanks yo your post - saved me few hours
ReplyDelete