Data appending not working

Am trying to append the data using replacement variables but when the query is run the result is not the corect one.

 

(eg) 

Scenario 1:

Query used:

Select * from t1 

where time_stamp>'!{lastvalue:time_stamp}!'

order by time_stamp asc

 

time stamp value is null for the first run and hence all the records are loaded

After the inital run ,i see the time_stamp value has been updated in the curent value column of the replacement variable which is the last value found in the table.

 

Now when i run the job am expecting the Query to return no rows but the entire data is returned and true duplicate data is appened.

 

Scenario 1:

Select * from t1 

where time_stamp>'!{lastvalue:time_stamp}!'

order by time_stamp desc

 

time stamp value is null for the first run and hence all the records are loaded

Ater the first run  i see the time_stamp value has been updated in the curent value column of the replacement variable which is the first value found in the table.

 

Now when i run the job am expecting the Query to return the entire data but there are no rows returned.

 

I find this logically incorect as 

 

Select * from t1 where time_stamp> max_time_stamp  order by time_stamp asc , should return any result..

 

I think this is a bug , please advise other wise.

 

 

My aim is to use the replacement variable to capture only the incremental records.

 

Comments

This discussion has been closed.