
Originally Posted by
Ajax
did your category field have a criteria? If so, it may be that you are now bringing data through which is excluded in the 'working' form - and perhaps there is something wrong with that data...
Why do you have the tblCustomerListReporting table - you are not using it?
Also, small point, but you should be applying the criteria to a WHERE column, not a GROUP BY column. HAVING should only be applied to columns that are aggregated. As structured at the moment, you are bringing all data through and then applying a criteria - so a much slower query.