A previous suggestion for temporary views (i.e. CREATE VIEW #ViewName AS ...) here: https://connect.microsoft.com/SQLServer/feedback/details/640863/please-allow-creation-of-temporary-views has been closed with the justification that a workaround is to CREATE a view in tempdb and then DROP it later.In my opinion this is a very poor justification. Would you make the same argument for temporary tables? Of course you wouldn't, because they already exist in T-SQL. Temporary views would be very useful where the definition of a SQL statement would be utilised multiple times in a stored proc but would not be required *outside* of the stored proc. If temporay tables are considered useful (as they clearly are - because they exist) then the same should apply to temporary views.
Product Language
Category
Proposed Solution
Primary Benefit
Other Benefits