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 |
|
mdanwerali
Starting Member
30 Posts |
Posted - 2002-10-30 : 03:55:24
|
| Hi,How to use Getdate() and rand() functions in a user defined functions.for example:Create FUNCTION Random(@intval int) RETURNS intASBeginDECLARE @counter intDeclare @outval intSET @counter = @intval BEGIN select @outval = RAND(@counter) ENDEndGOit is giving error :Server: Msg 443, Level 16, State 1, Procedure Random, Line 8Invalid use of 'rand' within a function.Please help me in explaing me how to use system default functions in user defined functions.thanks in advanceMd Anwer Ali |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
|
|
|
|
|