Thanks Mark. I went back to the cID as you suggested. I added a 0 padded iItemID before the date and also padded the rest of the cID with 0 just like you wanted (though expanded) and your query works lightening fast. I will be able to make practical use of it I am sure.
Thanks again for your patience with my question Kind regards Bhavbhuti
