title: How to loop User Defined Data Types in SQL and pass parameters to Procedure
body: <p>Consider I have below User Defined Data Type:</p>
  <pre><code>CREATE Type udt_MyType as Table(
  @ID int,
  @Name varchar(20),
  @Address varchar(100)
  )
  </code></pre>
  <p>Consider I have stored Procedure as below:</p>
  <pre><code>CREATE PROCEDURE sp_MyProc (
   @ID int,
   @Name varchar(20),
   @Address varchar(100)
  )
  ----Some Execution----
  </code></pre>
  <p>Now I want to create new Procdure which call above sp_MyProc by looping on udt_MyType
  (***But without doing any changes to sp_MyProc)
  So I want something like below:</p>
  <pre><code>CREATE Procedure sp_NewProc(
  @udt as udt_MyType READONLY
  )
  AS
  BEGIN
       WHILE LOOP on @udt   ----to get each row
       BEGIN
       exec sp_MyProc @udt.ID,@udt.Name,@udt.Address
       NEXT
       END
  END
  </code></pre>
  <p>Note : I dont have permission to change sp_MyProc<br />
  Is it possible to achieve sp_NewProc? I want to loop on UDT and pass parameters to procedure?</p>