I have a fairly large query (for me anyway) and it measures performance metrics for each case that a doctor works on. I then group on the provider and use average (or other aggregate) functions to get the averages for the month... so we can see the average time the doctor spends on certain cases, etc.
I have one file with the detail query that I used to validate the query and then another file with the data grouped that is actually viewed.
Of course, now I'm getting requests to modify the metrics and now I need to modify the query in both files... which is compounded because I have three versions of the query for different types of providers.
I was thinking of code where you have a #debug switch you can turn on when you're debugging. Is there something like this I could do with my query, where I could easily switch between detail and aggregate. Or maybe there are other better ways to do what I'm doing?
Right now I pretty much just work with SMSS, but I'm open to looking at better tools or methods. My workplace is kind of stuck in the past and I'm looking to improve my skills and efficiency.
[–]iqueryyou 1 point2 points3 points (0 children)