Hello I used this code :
setDT(tab)[interval_tab, V1 := scaffold,on = .(V1, V2 >= start, V2 <= end)]
and I got the error :