SolvedPrivate

Changing the Value of a variable on the fly in SSIS

Posted on 2014-09-12
10
32 Views
Last Modified: 2016-02-11
Good morning,

I have three loops that i need to run to get files from folders. I have one variable called @table_name that i want to use to update the table, (thru a sp). and input the file name that i just looped thru in the table. The table name will change for each file type.  so, i'll use dynamic sql in the sp, and pass in the variable name (table). Initially this works fine, but i can't figure out the best way to update the variable. Would it be better to do this with a derrived column ? though, i though that would work, i keep getting an error (something about conversion).
0
Comment
Question by:basile
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
10 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 40319181
>can't figure out the best way to update the variable.
Note quite following you, but to update a variable 'on the fly' in SSIS create a script task, pass the variable that has the value as read only, pass the variable name to be updated as read-write, and using VB code the script will go like this:

Dts.Variable("variable_name_to_write_to").Value = Dts.Variable("variable_name_to_write_from").Value
0
 
LVL 1

Author Comment

by:basile
ID: 40332433
I've requested that this question be deleted for the following reason:

I couldn't get an answer for this question.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40332434
Uhh, no.  Please work with experts when they make comments.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 1

Author Comment

by:basile
ID: 40332816
I don't understand? I didn't get the answer I was looking for... Should I give the credit anyway?
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40332927
>I didn't get the answer I was looking for...
And you didn't respond to expert comments either.  So, please spell out how we would know 'what you are looking for' if there is no follow-up between asker and expert.  Vulcan mind meld?  The Force?   Most experts are not going to write a book based on a five line question with no follow-ups.

I'm not intentionally trying to be rude here, but askers have an obligation to work with the experts that are trying to help.
0
 
LVL 1

Author Comment

by:basile
ID: 40333210
ok, not taking anythign as being  rude. it was my fault. I was able to figure out a solution. I could care less about the points, so i can award them. i apologize for not following protocol, i've been on here a long time, and i've never had an issue.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 40333238
np
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Here's a requirements document template for an integration project (also known as Extract-Transform-Load or ETL) based on my development experience as an SQL Server Information Services (SSIS) developer over the years.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question