• Thanks for the reply. Solved it in a stored procedure. Maybe not so nice, but it works.