Why is data missing from my result set?
Your co-worker has given you a SQL query and explained what it is doing and what the expected results of the query are. They then go on an extended vacation and it is time for you to run the query. You follow the steps precisely as your co-worker explained and when you look at the results, you notice that you have not gotten the results that you were expecting. You examine the SQL query and confirm that there are no issues with the query and you are not getting any error messages when the query runs.
So what could be causing the problem? This could be a case where two co-workers do not have the same level of security. If co-workers have different security settings, then you will not get the same results when running the same query. For example, the following code shows the sample SQL query that was initially created and the results that were returned:
SELECT Â Â Â c.[City], Â Â Â c.[Region], Â Â Â SUM...