Reading the current value of a variable used in select statements

  • I have created and populated a variable that gets the last value in a column. It is used to run an incremental update from the source table. The package completed some rows then failed. I assume the new records did not come into the data warehouse in strict numerical order. Therefore, I will have gaps in the data and the routine to find the last transaction will not allow me to pick up the data that was omitted by the abortive package.

    My question is, how can I read the value of the variable that was used to kick off the last data extraction?

  • Hi,

    I assume that you are using a Data Flow Task, and that you need to write a SQL statement in the data source which would filter data based on the variable.

    If that is the case, you should set the "Data access mode" as "SQL Command" in the Connection Manager tab of the Source Editor and write the SQL statement in the "SQL command text" text area. You can use a placeholder such as "?" to specify the parameter, and use the "Parameters" button to map the variable to this parameter.

    Let me know if this helps.

    Regards

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply