I have a question regarding creating a view. Does the view name has to be something in the existing database? I got the following error when I create a view. Please help, thank you.
Create view V_[I_DETAIL]
Left([I_DETAIL].[CASTMONTH],4) As CASTYEAR
-- using CASE, if aired, make it equal to invoice
--if failed,make it equal to no invoice else NA
when 'Aired' then 'Yes'
when 'Failed' then 'No'
else 'Not Applicable'
end as [INVOICE]
FROM [Opt].[EDA.[I_DETAIL] as invoice_detail
select * from V_[I_DETAIL]
Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'I_DETAIL'.