Ajay Mavatkar

Ajay Mavatkar

  • NA
  • 68
  • 11.6k

Get top 10 records from sp

Jun 20 2017 7:12 AM
Hi,
 
I have a sp and I need to get top 10 record from sp.
 
Here is my effort,
 
DECLARE @Temp TABLE(id INT,Name VARCHAR(20),Phone VARCHAR(20))
INSERT INTO @Temp
EXEC sp_MyListReport
@id, @Name , @Phone
SELECT TOP(10) * FROM @Temp
 
@id, @Name , @Phone are parameters for sp, but it is not showing any records.
Any help will be appreciated. Thanks in advance
 

Answers (3)