Dynamic sql is no so dynamic after all?

As long as I use the hard coded sql to setup a datareader source.

Like select * from table

This way the designer is happy because all the columns gets populated. Life is good.

I can then use the expression in data flow task

select * from table where col=@[User::var]

this still runs and is happy because I previously used the hard coded sql to set stuff up.

But what if I wanted to do something like this

Select * from @[User::var]

No so easy It looks like the datareader source is limited in the way it will accept sql build on the fly. Is there any way to pull this off

Select * from @[User::var]

In a generic way



Answer this question

Dynamic sql is no so dynamic after all?

  • Dynamic sql is no so dynamic after all?