I am getting the following error when trying to run this cte
Invalid Object Name 'cte'
error when using the following CTE statement
WITH cte (LOC_ID, [Description], LOC_TYPE)
AS
(
select LOC_ID, DESCR, LOC_TYPE
FROM [APOLLO].[dbo].[TBL_STATIC_DATA_LOCATIONS_MERLIVE]
WHERE LOC_TYPE = 'DC'
)
select * from cte
I am using Microsoft SQL Server Management Studio.