>>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.
Nice... Thanks!
I should have also mentioned - does it change the solution if I am calling it for every row in a view? It could be called several hundred times in a row. Would it make more sense in that situation to pass in the 24 values that are already retrieved, or to use the solution as already posted?