>hi all,
>I have a customer who wants a report in excel for a number of customers. I have done it but it is very slow as i have lots of select statements and loops. What is currently happens now is that i look at the customer file to find the groupings and select these into a cursor. i look at this cursor and link into the transactions file for those customers. Now i have to produce figures for MTD and YTD for both this year and last, this is 4 different figures and i don't know how to do this in one select, or if its possible, so i have 4 selects. then to top it off i have to link to the details file and then the stock file so as to get a break down for stock groups 1 and 2. and i do this for every customer in the group, then when finished with that group open up a new worksheet and start all over again. i have it working but i really need to make it more efficient so any pointers/help very much appreciated.
>~M
Mark,
Can you post some simple data and desired result?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.