x
login about faq Site discussion (meta-askssc)

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 '12 at 09:06 AM in Default

makarthikeyan gravatar image

makarthikeyan
11 1 1

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

3 answers: sort voted first

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 '12 at 09:19 AM

makarthikeyan gravatar image

makarthikeyan
11 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 '12 at 10:08 PM Usman Butt
(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 '12 at 09:27 AM

JohnM gravatar image

JohnM
4.5k 1 3 7

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

you need to double the backslashes when using them in SSIS expressions.

more ▼

answered Jan 28 '12 at 12:35 AM

Daniel Ross gravatar image

Daniel Ross
2.9k 6 10 12

(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



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x751

asked: Jan 27 '12 at 09:06 AM

Seen: 421 times

Last Updated: Jan 29 '12 at 11:39 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.