UPDATE NWBUS set NWBUS.bcd_full =OLDBUS.bcd_full
from BUS_CAPACITY_DETAIL OLDBUS inner join BUS_CAPACITY_DETAIL NWBUS
on OLDBUS.bcd_bus_code=NWBUS.bcd_bus_code
where OLDBUS.bcd_ssn_code=16 and NWBUS.bcd_ssn_code=17
and OLDBUS.bcd_bus_code=
NWBUS.bcd_bus_code and OLDBUS.pickdrop=NWBUS.pickdropIn this code i update the table BUS_CAPACITY_DETAIL ,we fetch the value from previous session 2015 and add all the value in BUS_CAPACITY_DETAIL where session is 2016.
