It works now,
I'm pretty new at this and my sql was a bit off, but I still can't understand why it was constantly working in one environment and not the other.
Anyway, I got the sql straightened out and now it works fine in both live and test.
Another question, would there be a better way to do a date search than the way I've included in the attached pic? I seem to run into a snag when I want to search for a startdate of 2005-01-01 and 2005-01-31, it's not picking up the events on 2005-01-31 (probably because it's searching for 2005-01-31 00:00:00, right?)
I tried to search for >= 'qdate1' AND <= 'qdate2'
but I received an error.