Connecting with MySQL Provider
We can write SQL Command from Variable in OLE DB Source Task. How do we get SQL Command from vari开发者_运维百科able in ADO Net Source Task ? Here My Source is MySQL. Because I want to pass a parameter in this SQL Command at WHERE clause. I dont find SQL Command from Variable in ADO.Net Source task. And I cant connect to MySQL in OLE DB Task.
You can use an expression to specify a variable by doing the following:
- On the Control Flow, right click on the Data Flow task and select Properties
- On the Properties window, click the ellipsis for Expressions
- Choose the [ADO NET Source].[SqlCommand] from the Property drop down and click the ellipsis to go to Expression Builder
- In Expression Builder you can reference your variables and add in any SQL clauses you need.
Here is a very rough example...
精彩评论