Sorry, the second row is:
Using (Select IdStation,Dt_Hour,Measure,Rank From TTEMP) T
I've notice also that "R.RANK <= T.RANK" in the ON clause triggers the INSERT statement for records (not matched) that haves a R.Rank higher than T.Rank, duplicating the primary key IdStation+Dt_Hour
Should...