title: Using the Inserted Value To Return A String From Lookup Sql
body: <p>I have a stored procedure which inserts a customer into a SQL Server Database:</p>
  
  <pre><code>@Name varchar(50),
  @Country int,
  @DateRegistered datetime, 
  @NumberOfEmployees int,
  @ID int output,
  
  AS
  
  INSERT INTO AccountManagementChristian.dbo.Customer(Name, CountryID, DateRegistered, EmployeeRangeID)
  VALUES(@Name, @Country, @DateRegistered, @NumberOfEmployees)
  SET @ID = @@IDENTITY
  </code></pre>
  
  <p>I also have a look up table with the Country ID and Country Name and another lookup table with the EmployeeRange ID and the Number of Employees. Both Country Name and Number of Employees are strings.</p>
  
  <p>When inserting I need to be able to return the country name string that corresponds to the country ID that is inserted and the same for the Country Name and Country ID?</p>