• I have two Oracle scripts that handle this, but I need the same functionality in SQL Server 2005.

    Can you please upload Oracle scripts, can have an idea what it is doing and could try to map it to SQL Server 2k5.