Is it possible to declare a variable within a View? For example:
Declare @SomeVar varchar(8) = \'something\'
gives me the syntax error:
What I do is create a view that performs the same select as the table variable and link that view into the second view. So a view can select from another view. This achieves the same result