x

Is it a bug in SSIS?

I am developing a package where I extract data from a excel source to my database.The data in the database is slightly modified from the input data and hence I use a Derived Column Transformation in the package.The column data I modify is as below. "(DT_STR,260,1252)(("DIR" + "\" + (SupplyDemandSpecialistEnterpriseId)))".

I give the above statement in derived column where I need to concatenate "DIR" + "\" to the data in the column SupplyDemandSpecialistEnterpriseId.

But I get error that the column cannot be parsied and that it has invalid elements.I tried other special characters like *,-,/,& in the place of "\" and it works fine.I tried the below statement too. "(DT_STR,260,1252)(("DIR\" + (SupplyDemandSpecialistEnterpriseId)))". But still get the error.

Can anyone please guide me????It is urgent.

more ▼

asked Jan 27, 2012 at 09:06 AM in Default

makarthikeyan gravatar image

makarthikeyan
11 1 1 1

(comments are locked)
10|1200 characters needed characters left

3 answers: sort newest
you need to double the backslashes when using them in SSIS expressions.
more ▼

answered Jan 28, 2012 at 12:35 AM

Daniel Ross gravatar image

Daniel Ross
2.9k 11 13 14

(comments are locked)
10|1200 characters needed characters left
Is SupplyDemandSpecialistEnterpriseId a string type or an integer type? Is it possible that you need to convert that data to a string in order to concatenate it?
more ▼

answered Jan 27, 2012 at 09:27 AM

JohnM gravatar image

JohnM
6.9k 1 3 7

(comments are locked)
10|1200 characters needed characters left

Hi, Sorry.Some problem in the editor.Actually my doubt was to use a single backslash beteween the quotes. It goes this way. "(DT_STR,260,1252)(("DIR" + "[single backslash]" + (SupplyDemandSpecialistEnterpriseId)))". I don know why backslash went missing after I submitted the question.

Anyways the solution for the above mentioned problem is to use a double backslash in the place of a single one.

more ▼

answered Jan 27, 2012 at 09:19 AM

makarthikeyan gravatar image

makarthikeyan
11 1 1 1

Good that you sort this out yourself. And since it is the answer to your question, then mark it as the accepted one :)
Jan 29, 2012 at 10:08 PM Usman Butt
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x946

asked: Jan 27, 2012 at 09:06 AM

Seen: 1056 times

Last Updated: Jan 29, 2012 at 11:39 PM