title: Call stored procedure within stored procedure
body: <p>I have a stored procedure within SQL Server 2008. Inside this SP, I need to call another one and pass in two parameters as shown here:
  This gets executed at the end of the parent SP</p>
  
  <pre><code>EXEC [Testing].[InsertNewValues] @UserId, @RequestedById
  </code></pre>
  
  <p>This SP looks like this:</p>
  
  <pre><code>ALTER PROCEDURE [Testing].[InsertNewValues]
  @UserId int,
  @RequestedById int
   AS
  BEGIN
  -- SET NOCOUNT ON added to prevent extra result sets from
  -- interfering with SELECT statements.
  SET NOCOUNT ON;
  
  -- Do something with two parameters
  
  END
  </code></pre>
  
  <p>Yet when I run my project I get the error: </p>
  
  <blockquote>
    <p>Additional information: Procedure or function 'InsertNewValues'
    expects parameter '@RequestedById', which was not supplied.</p>
  </blockquote>
  
  <p>I've tried </p>
  
  <pre><code>EXEC [Testing].[InsertNewValues](@UserId, @RequestedById)
  EXEC [Testing].[InsertNewValues] @UserId @RequestedById
  EXEC [Testing].[InsertNewValues] (@UserId, @RequestedById)
  </code></pre>
  
  <p>But with no luck, can someone tell me what I'm doing wrong here? </p>