What is CutOffDateTime variable?
The CutOffDateTime variable contains the last time an SQL or a Pipeliner Datasource query is successfully executed.
How to use this variable
The variable can be directly referenced in the SQL query as shown below:
select ‘@@CutOffDateTime’ as DateLastExecuted,DOB,Name,Title from customers
where DOB > cast(‘@@CutOffDateTime’ as DateTime)
The sample query above will display the value of the CutOffDateTime variable. Notice that the variable is prefixed with 2 ‘@’ symbols and it is also encosed in single quotes. The value is provided as a string and not an actual datetime field value. If you need to evaluate the CutOffDateTime variable value as a DateTime type, then you can cast the value to a DateTime as demostrated in the ‘where’ clause above.
Testing SQL query with CutOffDateTime
The value of the CutOffDateTime variable can be initialized to any value from the Advanced tab of the SQL Datasource or Pipeliner Datasource task.