![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
#3
| |||
| |||
|
|
Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
#4
| |||
| |||
|
|
Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
#5
| |||
| |||
|
|
Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
#6
| |||
| |||
|
|
Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
#7
| |||
| |||
|
|
Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
#8
| |||
| |||
|
|
Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
#9
| |||
| |||
|
|
Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
#10
| |||
| |||
|
|
Try using the Execute SQL task from within the loop and not the Data Flow Task. "thejamie" wrote: Trying in SSIS to do something which technically should be rather simple. 1) create a for each loop that contains as a variable the name of an mdb database in a folder 2) use a stored procedure that prepares a query based on the variable name of that target mdb database 3) place data in the target mdb database. I am referencing a link from Jamie Thompson at http://blogs.conchango.com/jamiethom...component.aspx In the link, there is a seven step method to exvaluate an expression using a variable created in the SSIS package. After many attempts over the past couple of weeks I have as yet, been unable to determine what the proper syntax should be - worse, the details of the error message reveal nothing about how to approach this. The query in the variable looks like "EXEC CREATECOUNTRYTABLE "+@[User::TagetDBNames] or possibly "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+@[User::TagetDBNames] +"'" OR Frankly, any possible combination of the above I have been able to come up with such as EXEC CREATECOUNTRYTABLE ? or "Select ABC,CNAME FROM MYTABLE WHERE MYVAR='"+(DT_STR)@[User::TagetDBNames] +"'" AND ALWAYS THE SAME ERROR: Attempt to parse the expression "EXEC CREATECOUNTRYTABLE @[User::TagetDBNames]" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. Is there any hope for SSIS? Or is it not possible to pass an SSIS variable back to a sql query? -- Regards, Jamie |
![]() |
| Thread Tools | |
| Display Modes | |
| |