I want to create indexed view, any help would be appreciated. I have this:
ALTER VIEW vwCF WITH SCHEMABINDING
as
SELECT
ftt.FTSName
,cf.FTSTypeID
,ftt.SortOrder
,cf.SecTypeID
,st.SecTypeName
,st.SortOrder
IssuanceDate
,Issuance
,Principal
,Interest
,FlowAmounts
,Net
FROM dbo.CashFlow AS cf
INNER JOIN dbo.FinancialType AS ftt ON cf.FTSTypeID = ftt.FTSTypeID
INNER JOIN dbo.SecType AS st ON cf.SecTypeID = st.SecTypeID
Go
If you have any question let me know...thanks
Missed a coma, see
should be
Add the table alias in front of:
Where
tbl
is the table where the above information is allocated.(tbl could differ for the fields, check it!).