MSSQL Server 2017
SQL FIDDLE: LINK
CREATE TABLE [TABLE_1] ( PLAN_NR decimal(28,6) NULL, START_DATE datetime NULL, ); CREATE TABLE [TABLE_2] ( PLAN_NR