I\'m not talking about doing a \"SET NOCOUNT OFF\". But I have a stored procedure which I use to insert some data into some tables. This procedure creates a xml response s
The answer you're looking for is found in a similar SO question by Josh Burke:
-- Assume this table matches the output of your procedure
DECLARE @tmpNewValue TABLE ([Id] int, [Name] varchar(50))
INSERT INTO @tmpNewValue
EXEC ProcedureB
SELECT * FROM @tmpNewValue
ever tried SET NOCOUNT ON;
as an option?
I have recently come across with a similar issue while writing a migration script and since the issue was resolved in a different way, I want to record it. I have nearly killed my SSMS Client by running a simple while loop for 3000 times and calling a procedure.
DECLARE @counter INT
SET @counter = 10
WHILE @counter > 0
BEGIN
-- call a procedure which returns some resultset
SELECT @counter-- (simulating the effect of stored proc returning some resultset)
SET @counter = @counter - 1
END
The script result was executed using SSMS and default option on query window is set to show “Results to Grid”[Ctrl+d shortcut].
Easy Solution: Try setting the results to file to avoid the grid to be built and painted on the SSMS client. [CTRL+SHIFT+F keyboard shortcut to set the query results to file].
This issue is related to : stackoverflow query
You could create a SQL CLR stored procedure that execs this. Should be pretty easy.