Wednesday, October 14, 2009

Using Backslash (“\”) in SSIS Expressions

I wanted build an expression to make a folder name dynamically. (Basically expressions are anyway dynamic in nature)

So I simply used the “\” as end of my expression as stated below;

@[User::Differential_backup_path] + @[User::database_name] + "Differential\"

It gave an error;



Then I tried various methods including CHAR(47) which is an ASCII value for the backslash.


After spending some time on research in google, I found that you need to use two backslashes. (“\\”)

So the correct expression would be;

@[User::Differential_backup_path] + @[User::database_name] + "Differential\\"

2 comments:

  1. Glad to see that it was still helpful even after several years.

    ReplyDelete

How to fix cardinality estimation anomalies [Video]

Use the link mentioned below to watch the presentation that I delivered for PASS DBA Virtual Chapter about Filtered Statistics.  http:...