![]() ![]() SET = ‘ALTER TABLE ‘ + + ‘ ADD ‘ + + ‘ this procedure a varchar variable will generate a dynamic alter sql command and then run it with exec, so this is dynamic t-sql. ![]() Suppose you have a data stream with some data rows, for example these data rows:Īnd suppose you have a stored procedure as below: In this post I’ll describe the problem of OLE DB Command with dynamic t-sql, and propose two solution to do this with other transformations or tasks.įirst of all let’s explain the scenario exactly, Suppose you have a data stream in SSIS Data flow task and you want to run a dynamic t-sql query per each data row values, probably your first stop is OLE DB Command to run the sql statement per each data row, but OLE DB Command has a problem with dynamic statements, So you should use other ways, Using dynamic t-sql is one of the good abilities in SQL Server, and there are times which you need to do this in SSIS. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |