Part of my work involves creating reports and data to be used as information for decision. The majority of the data is aggregated, like inventory, sales and costs totals from departments, and other dimensions.
When I am creating the reports, and more specifically, I am developing the SELECTs to extract the aggregated data from the OLTP database, I worry about mistaking a JOIN or a GROUP BY, for example, returning incorrect results.
I try to use some "best practices" to prevent me for "generating" wrong numbers:
Even with those procedures, I always worry about the numbers.
What are your best practices for ensuring the correctness of the reports?
asked Mar 15 '10 at 06:48 PM in Default
You've covered a lot of what I do, especially checking with the business users. The one thing I'd add is in how you construct the queries. I find the root table and always validate that I'm pulling back from that table the information I should be. I tried to get a row count from that table early and then maintain that row count as I modify the query.
answered Mar 15 '10 at 08:21 PM
Grant Fritchey ♦♦
One extra thing that I will sometimes do, before even going near any T-SQL, is run through roughly on paper how the report will be generated with the person that wants it. This has led to changes a number of times for me in the past, and I really prefer to get change requests before there is anything to have to change!
answered Mar 16 '10 at 04:31 AM
Matt Whitfield ♦♦