General information
Forum:
Microsoft SQL Server
>Hi keith,
> I create diffent view for optimization. example I have viewA and (viewB+Index). with both the same source table. I want to use ViewA for update. so I update ViewA still i got an error. Does it means i can no longer use any VIEWS?
>tnx
Sure you can. Just make sure that you are retreiving the primary key(s) for each table in the view that will be updated. Also from SQL BOL:
"The DELETE, INSERT, and UPDATE statements can reference a view as long as SQL Server can translate the user's update request unambiguously to updates in the base tables referenced in the view's definition."
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only