>I have an store procedure sorry I confuse you. I have an store procedure that is doing that calculation an is working perfect. But they dont want me to use the same code in multiple places, and the function in SQL does not allow to do it.
Hah? Did you even read my previous message?
--sb--