How to Suppress the SELECT Output of a Stored Procedure called from another Stored Procedure in SQL Server?
Solution 1:
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 [Id], [Name] FROM @tmpNewValue
Solution 2:
I think I found a solution.
So what i can do now in my SQL script is something like this (sql-psuedo code):
create table #tmp(xmlReply varchar(2048))
while not_done
begin
select top 1 record from updateTable where processed = 0
insert into #tmp exec insertSomeData @param=record
end
drop table #tmp
Now if there was a even more efficient way to do this. Does SQL Server have something similar to /dev/null? A null table or something?