• terrance.steadman (11/1/2010)


    Ok, some of you are complaining about the use of the LEFT JOIN. Please allow me to explain. When I am running some reports on the data, I am requested to show which ones fall into certain date ranges and which ones fall into different date ranges. The final set of records will end up having some flags on them for reporting purposes. None of the records are to be excluded just because they don't fall within the date check. So, I can't just throw them away in the script by doing a regular JOIN.

    But you ARE doing a 'regular' join in your "new" query. You're left joining on one end date, and inner-joining on the other. That's the entire point. The two queries don't yield identical results in all cases. And you're surprised by their having differing run times? The entire test (and the story resulting from it) is meaningless.

    Does anyone verify these stories before they're posted?