LAG() function hold the previous value so I want to flush it only ? Is there any query/command to flush log/cache of LAG() function in oracle ?
I don' t want to flush all logs from oracle. I just want to flush stored previous value in Lag() function.
Actual Problem:
Oracle get row where column value changed
I am facing same problem as above and i used this query to getting changed value
select *
from t2
where date1 = (
select max(date1)
from (
select
id,
date1,
cctr,
lag(cctr) over(order by date1 desc) as prev
from t2
) x
where
prev is not null and
cctr <> prev
);
but in my case i have status column which i update with 'Y' and 'N' so when i use above query and I change the status 'Y' with 'N', it shows the changed row but when i change again status from 'N' to 'Y' then it does not show the changed row. I am using lag() function.
I am thinking if there is any command to flush/clear lag() function cache? because it check previous value. or there is any solution?