Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Many parameters in a Scalar-valued Function
Message
 
 
À
14/08/2008 18:58:49
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01338975
Message ID:
01339039
Vues:
13
>>I don't see anything wrong with 24 parameters by itself. If you want it make it generic and use in other places than pass 24 parameters. OTOH, if it's specialized UDF for calculation on that record only, than you can pass just PK.
>
>It's really not going to be generic. I would assume then in my function I would create 24 local variables, set those individually, and go on with my calculations, correct?

Mike,

If you only pass ID and you need 24 fields for your calculations then you would need 24 variables declared. You can set them in one SQL, of course.

Still passing 24 parameters to the function (how often do you want to call it?) may be problematic and tedious to write.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform