Using variables in SSIS
Hi , Im usin a table that I get the Id from that record.. Now i want to keep my Id in one variable to assign to a flatfile record and to a flatfile name or to use in all process that i'm runing can you give me some example or some tips.. Thaks Pedro
November 19th, 2012 1:24pm

Hi Pedro, Everything you need is in the Execute SQL Task. On the General Tab You can create your connection if you do not already have one. You can input your query or select a SQL script. On the parameter mapping tab you can create your variable if you don't already have one and choose a direction of output to read it out to that variable. You of course have to add the parameter using the add button. That is really all you have to do besides match the data types of parameters and the data you are passing through it. From there you can use the parameter you assigned to retrieve data as an input parameter restricting your flat file set based on it and using it as a variable in the name of the create file object and destination. All the best, TomIf you're happy and you know it vote and mark.
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2012 1:57pm

Hi Pedro, Everything you need is in the Execute SQL Task. On the General Tab You can create your connection if you do not already have one. You can input your query or select a SQL script. On the parameter mapping tab you can create your variable if you don't already have one and choose a direction of output to read it out to that variable. You of course have to add the parameter using the add button. That is really all you have to do besides match the data types of parameters and the data you are passing through it. From there you can use the parameter you assigned to retrieve data as an input parameter restricting your flat file set based on it and using it as a variable in the name of the create file object and destination. All the best, TomIf you're happy and you know it vote and mark.
November 19th, 2012 1:57pm

Pls check this thread might useful http://www.simple-talk.com/sql/ssis/working-with-variables-in-sql-server-integration-services/ http://uk.linkedin.com/in/ramjaddu
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2012 2:11pm

Hi Pedro, Everything you need is in the Execute SQL Task. On the General Tab You can create your connection if you do not already have one. You can input your query or select a SQL script. On the parameter mapping tab you can create your variable if you don't already have one and choose a direction of output to read it out to that variable. You of course have to add the parameter using the add button. That is really all you have to do besides match the data types of parameters and the data you are passing through it. From there you can use the parameter you assigned to retrieve data as an input parameter restricting your flat file set based on it and using it as a variable in the name of the create file object and destination. All the best, TomIf you're happy and you know it vote and mark.
November 19th, 2012 2:13pm

You can use an Execute SQL Task to get value into the variable. This example get a integer value (max id) and puts it into an int variable Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2012 2:20pm

You can use an Execute SQL Task to get value into the variable. This example get a integer value (max id) and puts it into an int variable Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
November 19th, 2012 2:20pm

You can use an Execute SQL Task to get value into the variable. This example get a integer value (max id) and puts it into an int variable Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2012 2:36pm

Pedro, Be sure to vote for me even though I didn't include a picture like SSISJoost. :)If you're happy and you know it vote and mark.
November 19th, 2012 2:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics