File Paths In Expressions – SSIS
August 14th, 2008 | Published in Integration Services, SQL Server
There have been several times recently where I have been stumped by SSIS’s inability to parse out expressions that are strings.
I assume most of the time that if it’s a Microsoft product, then its VB script. This is not the case in SSIS.
When evaluating strings, SSIS will evaluate the “\” as an escape character. So if you have a file path of \\server\relativepath, you will throw an error when you try and parse that as an expression.
In C# we would qualify the string as literal with the @ sign. This does not work in SSIS. You have to go the full distance and enter one escape character per escape character to be treated as a literal string.
In other words – \\server\relativepath becomes \\\\server\\relativepath.
I hope this saves somebody some time as it can be a real stumper.