title: SQL Stored Procedure to return results with multiple parameters
body: <p>I want to create a stored procedure that returns the results of a search for "similar records". The stored procedure  i currently have is as follows</p>
  
  <pre><code>CREATE PRODECURE [dbo].[viewSimilarRecords]
   @recordType varchar(25),
   @recordSource varchar(25)
  
   AS 
  SELECT * FROM myTableName 
  WHERE
  (recordtype = @recordType) AND
  (recordsource = @recordSource)
  
   GO
  </code></pre>
  
  <p>The problem i'm having is that when it executes i get a return value 0 and the resulting rows do not show up (SQL Server Management Studio). </p>
  
  <p>I can confirm i'm passing the correct values in the params and that multiple records do exist.</p>
  
  <p>This is the execute Statement when it's ran</p>
  
  <pre><code>USE [databasename]
  GO
  
  DECLARE @return_value int
  
  EXEC @return_value = [dbo].[ViewSimilarRecords]
      @recordType = N'Error',
      @recordSource = N'Local'
  
  
   SELECT 'Return Value' = @return_value
  
   GO
  </code></pre>