sqlsql-serverssisetlexpressionbuilder

Use SQL Field in SSIS Variable


Is it possible to reference a SQL field in your SSIS variable?

For instance, I would like use the field from the "table" below

Select '999999' AS Physician_Profile_ID

as a dynamic variable (named "CMSPhysProID" in our example) here

enter image description here

I plan on concatenating multiple IDs into a In statement.


Solution

  • Possible by using execute sql task


    In left side pan of Execute SQL task, general tab


    1.Select result set as single row
    2. Connection type ole db
    3. Set connection and form SQL statement, As you mentioned Select '999999' AS Physician_Profile_ID
    4.Go to result set in your left side pan
    5. Add your variable where you want to store '999999'
    6. Click ok