Creating temporary view from a temporary table in SQL Server
Unfortunately, SQL Server doesn't support this:
Msg 4103, Level 15, State 1, Line 3
"#someView": Temporary views are not allowed.
Msg 4508, Level 16, State 1, Line 6
Views or functions are not allowed on temporary tables. Table names that begin with '#' denote temporary tables.
You can use a Common Table expression to do that:
WITH Top10Records AS
(
select top 10 * from #MytempTable
)
SELECT * FROM Top10Records
GO