Govindan
Govindan

Reputation: 31

Need to update table row from UDF in SQL Server

I am using a function in the view for getting some result sets. In that function, based on some condition need to update rows to the database table.

Can anyone tell me, How can I do this

Upvotes: 2

Views: 1876

Answers (2)

Balend
Balend

Reputation: 1

SPs can read, write, delete, and update permanent tables.But you must be considerable if you wanna update rows in the base table (tables) of the view because there are some restrictions

Upvotes: -1

Randy Minder
Randy Minder

Reputation: 48522

You cannot do this using SQL Server. SQL Server does not allow Update/Delete/Insert statements in UDFs. I think you are also prevented from calling a stored procedure as well.

Upvotes: 2

Related Questions