I am trying to generate some SQL which is used to calculate some final scores -> children Think about the school and their end in the year's score.
I was going to about 5 or so scaler UDF, accepting some simple values (for example, current score, subject matter, whatever) and then exit the decimal value.
e.g.
Make [DBO]. [GetRatingModifier] (@examscoker DCIMAL (6, 2), @ Project 1 Ascor Decimal (6, 2), @ Project 1 Sore Decimal (6, 2), @ Project 1 Sores Decimal (6, 2), @SubjectTypeId TINYINT) Start as Return Decimals (8,5) @ seconds DCIML (8,5) SELECT @score = (CASE @ Project1Score, when 1 again 10 then 2 and 12.4 ...) ..) + (Case Bulla .. You get drift) .. return @Score END
logic has only math
< / P>
"lesson">
Sure, no problem - the same is the display You will inline in each SELECT as much as you can. I do not think this should be any problem - exactly on the contrary, putting it in the UDF looks like a very good idea! (To keep your T-SQL code clean and simple)
Mark
Comments
Post a Comment