Need to replace left outer join with inner join for creating indexed view. | SQL Server Performance Forums
SQL Server Performance Forum – Threads Archive
Need to replace left outer join with inner join for creating indexed view.Hi,
Can any one help me on this :
Select T.* , P.col1, Q.col2
from Tab1 T left outer join Tab2 P
on T.col1 = P.col1 and T.col2 = P.col2
left outer join Tab3 Q on T.col3 = Q.col3
>> I need to convert this from left outer join to inner join or sub query is also acceptable . This query is for creating view The reason is I want to convert it because I want to convert it to a Indexed view.
Need imediate help !!!
I tried a few ideas (FULL JOIN, UNION …) but creating an index always fails with this error:
Server: Msg 1936, Level 16, State 1, Line 1
Cannot index the view ‘my_view’. It contains one or more disallowed constructs.
From previous experiences, it doesn’t help to hide the join in a derived table or a nested view.