I have a view which contains a derived column, and I need to create a stored procedure which make an insert into the view
I've tried
CREATE PROCEDURE INSERTInVIEW
(
@ID DECIMAL(10,2),
@Name ....,
@Address....,
@Phone
)
AS
BEGIN
INSERT INTO MyView (ID, Name, Address, Phone)
VALUES (@ID, @Name, @Address, @Phone)
END
where the Address is a computed field in the view. I getting the error that the insert failed because it contains derived or computed field. Which should be the best way to do this insert?
If your view is based on multiple tables it's likely not updateable. Try checking the information_schema tables: