Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Update in user Defined function

Author  Topic 

sql_buddy
Starting Member

41 Posts

Posted - 2009-11-11 : 01:42:47
i am using sql 2005
my requirement is, i want to use Update in user Defined function and that user defined function will be used in other Update query assigning value to a column.

currently we are using scalar function but it is neither allowing update function in it nor couldcall any stored procedure that could on it part could update the database table.
waht need to be done?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-11-11 : 04:00:52
No. You are not allow to perform UPDATE in a function. You have to use Stored Procedure to do it.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

sql_buddy
Starting Member

41 Posts

Posted - 2009-11-11 : 04:08:04
can we call Stored Procedure in Update query ?
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-11-11 : 04:18:20
quote:
Originally posted by sql_buddy

can we call Stored Procedure in Update query ?




No. You can't


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -