Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could change your source to a select query and list out the columns along with the static value you want to map.</p> <pre><code>SELECT SOURCECOLUMN_1,SOURCECOLUMN_2,....,SOURCECOLUMN_N,'VALUE' AS DESTINATIONCOLUMN FROM Source_Table </code></pre> <p>My original thought was that you could use the query right in the Import &amp; Export wizard. you can obviously do alot more if you go in and edit the package, but it sounded like you didn't have much expereince with that. Here is how you would do this in the wizard.</p> <p>After you have selected your source and destination databases you can Specify Table Copy or Query. Select the <strong>Write a query to specify the data to transfer</strong> option <img src="https://i.stack.imgur.com/1YDSH.png" alt="Specify Table Copy or Query"></p> <p>On the next screen enter the query listing out all of the columns and add in your static columns. <img src="https://i.stack.imgur.com/hfQj5.png" alt="Queryscreen"></p> <p>On the Next screen You will need to select the Destination table or it will default to creating a new table named <em>Query</em>. You should be able to choose from the drop down. As long as you aliased your extra columns with the same names it should map correctly. You can go in and edit mappings here if needed. <img src="https://i.stack.imgur.com/NZ9ni.png" alt="Destination"></p> <p>You can then save off the SSIS package and it will source form the query. </p> <p>Alternatively if you already have the SSIS pacakge created without the extra columns you can go in to the Data Flow and change the <strong>Data access mode</strong> in the OLE DB Source to be a SQL Command instead of a table or view. Add your query here.</p> <p><img src="https://i.stack.imgur.com/x2RyP.png" alt="enter image description here"></p> <p>You can then go into the properties of the OLE DB Desitination in the Dataflow and map the new column. You could also add in a derived column as @DominicGoulet by adding in a Dervied Column task and putting your static information here and then mapping. If you want to see that solution too let me know.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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