hi sol,
You can put the data into an alternate temp table or table variable to do the calcs, but thought it was a bit messy so revisited it before submitting so that it used the base code.
Edit :cross post.
_________________________________________________________________________
SSC Guide to Posting and Best Practices