Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL 2000 functions and parameters default value
Message
 
 
À
07/03/2002 13:32:06
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00629760
Message ID:
00629794
Vues:
6
This message has been marked as the solution to the initial question of the thread.
You have to pass keyword "default" to indicate that function shoul use default value for that parameter.

>Ok, here's the part of BOL about CREATE FUNCTION:
>
>   CREATE FUNCTION [ owner_name. ] function_name
>   ( [ { @parameter_name [AS] scalar_parameter_data_type [ = default ] } [ ,...n ] ] )

>
>(Bold is my emphasis)
>
>Now, in Invoking User-Defined Functions, we can find this:
>
>   When you invoke a function, you must supply argument values for all of the parameters...
>
>Now the question: what's the point of specifying a default if you've got to supply the argument in the first place? I wanted to have an optional argument to a function I'm creating, so based on the CREATE FUNCTION help, I assumed it was possible, but looks like it isn't.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform