If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: DB2 consecutive check query

I need to run a query - that checks the last 3 consecutive times by distinct type

so for example order by timestamp asc... if the last 3 records for type 326 = Y and the current value = N then change the current value to Y to match the last 3 records. I need to do this for all records. So it needs to check by time and type

I can not understand your question
What do you mean "checks the last 3 consecutive times by distinct type"
and what is the "current value"
Maybe giving some example data and expect result will make the question more clear.