Foreach Loop In Sql Server Stored Procedure