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:
01339040
Vues:
13
>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?

You can retrieve all of them in one select
SELECT
     @var1  = field1, @var2 = field2, ..., var24 = field24
  FROM ...
  WHERE pk = @PK
If calculations are simple you can do them in select as well. You can also do some partual calculations, if possible into intermidiate variables and then complete calculation using them.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform