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

Understanding Skewed Data in SQL Server

My latest article.  http://bit.ly/2qd4rtl Understanding Skewed Data in SQL Server bit.ly Introduction I re...