Ach but we agreed at the start.... wasn't my design so happy to call it cack ..... still where to go from here is right..... this code is live in somewhere in the region of 150 companies. there are rarely more than 20 active campaigns but the issue is that the campaign tables are all dynamically created (and no, there are no Primary Keys or even indexes !!), some of these tables can have upwards of 500,000 records in each, hence the table scanning issue.

I need to see a return on this bringing it closer to 5 seconds as opposed to between 25 and 50 seconds......

I have just got agreement to sub-set the data to use only today's data so will begin from there.... whether to stack it all into a temp table is the next part as the Where statement simply compounds the tablescan....

Suggestions ??

Cheers

Chub..