> Unfortunately, this is going to run only via a stored proc fortunately, you are allowed to loop inside a stored proc ;o)