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 |
|
xpandre
Posting Yak Master
212 Posts |
Posted - 2002-05-13 : 07:43:42
|
| can i pass optional parameter to an UDF?if yes how?thank youSam |
|
|
VyasKN
SQL Server MVP & SQLTeam MVY
313 Posts |
Posted - 2002-05-13 : 07:50:23
|
| Not really. But you can assign a default value to the parameter and pass DEFAULT, when calling the function. Here's an example:CREATE FUNCTION dbo.MyFunc ( @p1 int = -1) RETURNS int AS BEGIN RETURN @p1 ENDGOSELECT dbo.MyFunc(DEFAULT)GO--HTH,Vyashttp://vyaskn.tripod.com |
 |
|
|
|
|
|