How to capture changes?

  • Got it. Thanks

    Eralper (6/21/2010)


    Hi pcgm,

    My code responds to changes in model

    If you want to respond to changes in value column please change the WHERE clause as follows

    t1.value <> t2.value --t1.model <> t2.model

    I mean

    with cte as (

    select *, rn = ROW_NUMBER() OVER (Order By Id) from FindChanges

    )

    select t1.*, t2.*

    from cte t1

    full join cte t2 on t1.rn = t2.rn + 1

    where t1.value <> t2.value

    I hope I'm not missing something too.

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply