Sql_last_value with tracking column

I'm little confused with the "clean_run" option. from documentation it says "If clean_run is set to true, this value will be ignored and sql_last_value will be set to Jan 1, 1970, or 0 if use_column_value is true, as if no query has ever been executed."

then how will the following statement works if sql_last_value is set to 0

statement ="select defect_id,owned_by,severity,status,summary,application,created_by,creation_date,modified_by,modified_date,assigned_to from defect_detail where defect_id>:sql_last_value order by defect_id"
#Below is configuration when want to use last run value
clean_run=true
use_column_value =true
tracking_column =defect_id
record_last_run =true

will the "record_last_run" solve it ? can anyone explain

I don't understand the question. If clean_run is set to true the sql_last_value query parameter will be set to zero, so that query will become

select defect_id,owned_by,severity,status,summary,application,created_by,creation_date,modified_by,modified_date,assigned_to
from defect_detail where defect_id>0 order by defect_id

which presumably selects all rows in the table. When those rows have been processed the id of the last row will be saved until the next run (and then you've presumably cleared clean_run).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.