I have a MS SQL CTE query from which I want to create a temporary table. I am not sure how to do it as it gives an Invalid Object name error.
Invalid Object name
Below is t
Here's one slight alteration to the answers of a query that creates the table upon execution (i.e. you don't have to create the table first):
SELECT * INTO #Temp FROM ( select OptionNo, OptionName from Options where OptionActive = 1 ) as X