Not sure how to do this so was hoping that someone could help, I have a multivalue parameter we shall call 'Week', this has a drop down of 1 through to 4. My data set example is :-
select total from tableA where Week in (@Week)
what I want to do is divide the total by the number of options I pick from the drop down, e.g. if I picked Week 1 & 2, I would want the TSQL statement to use the count of 2 as the value to divide by e.g.
select total/2 from tableA where Week in (@Week)
is this possible?
Thanks P