Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View to Update data 1

Status
Not open for further replies.

Jenns

Programmer
Nov 1, 2000
36
US
Is it possible to create a view to update or insert data into a table?

I get the SQL update statement to work but can't save it as a view. When trying to save I get an error that there is incorrect syntax near the keyword "update". Is there a special syntax for Update and Insert Views?

Here is the "query" I am trying to save as a view.

UPDATE E
SET Toteligible = V.totalelig
FROM elpayout E INNER JOIN
vieweligible V ON E.initials = V.code

Thanks for any help,
Jenn
 
There is no such thing as an insert or update view. You can create a view that you can insert into or update, but all views are select statements. You will need to update or insert using a stored procedure or a normal insert / update statement sent though whatever you are using to talk to sql server.

 
OK. I thought so. Thank you for your reply.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top