Tuesday 11 March 2008

SQL Induced Brain Death part 2

I've seen the light at the end of the tunnel, and thankfully this time it wasn't an oncoming train.

I've finally managed to get the correct data out in a usable format and generate the reports that our accounts department required (reconciling the net number of newspapers sold, grouped by route to market and taking into account discounts and returning the correct revenues). The SQL query used is a bit of a beast (and takes half-an-hour to run) but it at least returns the correct result set.

Now I can sit down quietly and have a head-ache!

No comments: