如何使用SELECT * INTO tempTable from CTE Query创建临时表
我有一个要从中创建临时表的MS SQL CTE查询。我不确定该怎么办,因为它会导致Invalid Object name错误。 下面是整个查询供参考 SELECT * INTO TEMPBLOCKEDDATES FROM ;with Calendar as ( select EventID, EventTitle, EventStartDate, EventEndDate, EventEnumDays,EventStartTime,EventEndTime, EventRecurring, EventStartDate as PlannedDate ,EventType from EventCalender where EventActive = 1 AND LanguageID =1 AND EventBlockDate = 1 union all select EventID, EventTitle, EventStartDate, EventEndDate, EventEnumDays,EventStartTime,EventEndTime, EventRecurring, dateadd(dd, 1, …