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.
| Author |
Topic |
|
mpolaiah
Starting Member
24 Posts |
Posted - 2009-08-18 : 08:27:44
|
| Hi Allmy function is --drop function prioritycreate function priority(@nRequestDetailsID int)RETURNS int ASbegindeclare @pre int, @a intselect @pre = cnt from counterif(@pre>= 4)beginupdate counter set cnt = 2endelsebeginupdate counter set cnt = cnt+1end RETURN @preendbut it is not workingthe error is.....................Msg 443, Level 16, State 15, Procedure priority, Line 16Invalid use of side-effecting or time-dependent operator in 'UPDATE' within a function.Msg 443, Level 16, State 15, Procedure priority, Line 20Invalid use of side-effecting or time-dependent operator in 'UPDATE' within a function.how to slove the problemplease help meeeeeeeeeeeeeeyourspols |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-08-18 : 08:55:53
|
| HiDML statements are invalid in scalar UDFs.Why do you created function. you can create proc right....-------------------------R... |
 |
|
|
|
|
|