How to declare column name as variable ?
Hi Guys, I need to store couple of columns in different variable, so I can use those variables later stage. DataType: String Input Columns: StoreID StoreName 1234 ABCD I am using foreach loop and flat file connection, above are my column and I want to store them in variable to use in later stage in ETL. How can we store column name in variable inside the foreeach loop ? Thanks, D
November 8th, 2010 9:36pm

Are the column names to be stored in variables known beforehand or it is stored in some table?Nitesh Rai- Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
November 8th, 2010 10:23pm

Hi Nitesh, I need those Column names before hand, because I going to use those names to create Files E.g.: FileName_StoreID _StoreName.csv I am going to use expression something like this Sales+ "_" + [@USER::StoreID ] + "_" + [@USER::StoreName] + ".csv
November 8th, 2010 10:30pm

I want to know where are the column names stored? Suppose I have 2 column names A and B and I want to save them in a variable then I can directly create 2 variables and store the column names. Here I know that 2 column names are A and B but what if I don't know the column names? In case column names are not known, where to look for column names?Nitesh Rai- Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
November 8th, 2010 11:09pm

Ya you are right. As you said "then I can directly create 2 variables and store the column names". I want to know how to store those columns in variables. Column names are fixed they will not change columns are coming from flat file and they are always same position. I know its bit confusing, all I need how to create 2 variables and store the column names in them. Appreciate for your patience.
November 8th, 2010 11:17pm

Creating variables that won't change is simple. Right-click anywhere in your control flow, select variables. An explorer window should pop up. Type the name of the variable you, ie. str_StoreID. Set the data type as string with a scope of package level. In the value section type in your variable. Sounds like you need a dynamic solution though, reading record by record the store id and store name, correct?Please 'Mark as Answer' if found helpful - Chris@tier-1-support
Free Windows Admin Tool Kit Click here and download it now
November 9th, 2010 12:11am

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

Other recent topics Other recent topics