Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's the OLE DB Apporach:</p> <p>Create some parameters for your package. If you make them Required then they are, well, required and your package won't run without some values. The field in the Value column will be the default and used for debugging.</p> <p><img src="https://i.stack.imgur.com/CgOXK.png" alt="enter image description here"></p> <p>Then create a variable and add an expression:</p> <p><img src="https://i.stack.imgur.com/1l1Ty.png" alt="enter image description here"></p> <p><img src="https://i.stack.imgur.com/G1FbM.png" alt="enter image description here"></p> <p>The Expressions editor uses a washed out version of C#(if you were curious) </p> <p>Also <em>Make sure to add spaces in your string in between variables</em> Its hard to see but AND has a space on either side like so:</p> <p>" AND "</p> <p>I almost forgot. The values for yor parameters have to be in 'singleQuotes'. This can be done in one of two ways: You can either include the quotes when you give a value to the string or you can add some quotes in the expression(what I usually do).</p> <p>Adding them in the expression would look something like this:</p> <p><code>"some stuff " + "'" + @[variable] + "'"</code></p> <p>Click evaluate expression to see if your variable is holding the correct string.</p> <p>The last step is to add an OLE DB Source, set up the connection(if you don't have one yet) and add the query from variable.</p> <p><img src="https://i.stack.imgur.com/RLbB7.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload