title: SQL - Call Stored Procedure for each record
body: <p>I am looking for a way to call a stored procedure for each record of a select statement.</p>
  
  <pre><code>SELECT @SomeIds = (
      SELECT spro.Id 
      FROM SomeTable as spro
      INNER JOIN [Address] addr ON addr.Id = spro.Id 
      INNER JOIN City cty ON cty.CityId = addr.CityId
      WHERE cty.CityId = @CityId
  )
  
  
  WHILE @SomeIds  IS NOT NULL
  BEGIN
      EXEC UpdateComputedFullText @SomeIds
  END
  </code></pre>
  
  <p>Such a thing above is not working of course, but is there a way to do something like that?</p>