create table #temp ( pName Varchar(20), DateBegin DateTime, DateEnd DateTime ) Insert Into #temp(pName, DateBegin, DateEnd) Values(\'Player1\', \'01/04/2012\', \'
I had the same issue with SQL server 2017. Use semicolon before the WITH statement as follows.
;WITH