Invalid use of a side-effecting operator 'INSERT'
CREATE FUNCTION insertrecord(@id int, @location varchar(20)) RETURNS INT AS BEGIN INSERT Into [dbo].[Location] (Id,Emploc)values(@id,@location) RETURN SCOPE_IDENTITY() END GO Above code gives following Error Msg 443, Level 16, State 15, Procedure insertrecord, Line 11 Invalid use of a side-effecting operator 'INSERT' within a function.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.