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 |
|
mpandey3
Starting Member
1 Post |
Posted - 2009-03-01 : 19:45:20
|
| CREATE FUNCTION ufntGenerateRandValue ( @minValue int, @maxValue int)RETURNS intASBEGIN DECLARE @randNumber int Set @randNumber = Cast(RAND() * @maxValue + @minValue AS INT) RETURN @randNumber;ENDGOThis function compiles without error but when I tried to run it I got the following errors:Invalid use of side-effecting or time-dependent operator in 'rand' within a function.Please help me figure it outThank you. |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
|
|
|
|
|