Wednesday 15 January 2014

visual studio 2013 - Using variables in From part of a task flow source -



visual studio 2013 - Using variables in From part of a task flow source -

is there way utilize variable in part (for illustration select mycolumn1 ?) in task flow - source without having give variable valid default value first?

to more exact in situation i'm getting tablenames out of table , utilize command workflow foreach on list of tablenames , phone call workflow within gets info these tables each. in workflow have before mentioned select statement.

to work had set variable valid default value (on bundle level) else not create workflow (as datasource couldn't created select invalid without default value).

so question here is: there workaround possible in case don't need valid default value variable?

the datatables: different tables selected in dataflow have exact same tables in terms of columns (thus columns, naming of columns , datatypes of columns). info within of them different (thus info client a, client b,....).

you're in luck trivial thing implement ssis.

the base of operations problem people come @ ssis it's still dts whatever want within info flow. threw out extreme flexibility dts in favor of raw processing performance.

you cannot parameterize table in sql statement. it's not allowed.

instead, approach people take utilize expressions. in case, assuming had 2 variables of type string created, @[user::qualifiedtablename] , @[user::querysource]

assume [dbo].[spt_values] assigned qualifiedtablename. loop through table names, assign value variable.

the "trick" apply look @[user::querysource]. create look

"select t.* " + @[user::qualifiedtablename] + " t;"

this allows alter out table name whenever value of other variable changes.

in info flow, alter ole db source driven query contained in variable instead of traditional table selection.

if want illustration of utilize querysource drive info flow, there's illustration on mixing integer , string in ssis derived column

visual-studio-2013 ssis sql-server-2012

No comments:

Post a Comment