iamtechuser
IS-IT--Management
Hi,
I am running the following stmts.
I don't understand this... I believe it has something to do w/ the fact that I am select from a temp table, although it shouldn't. But if I select a regular table, then @output is NOT null, so it seems very suspicious it's the temp table.
What gives??
Thanks
I am running the following stmts.
Code:
insert into #tmp EXEC @result = master..xp_cmdshell @cmd
SELECT @output = IsNull(@output + char(10) + result, result)
FROM #tmp
PRINT @output -- this is NULL!!
SELECT * from #tmp -- this returns ROWS!!
END
I don't understand this... I believe it has something to do w/ the fact that I am select from a temp table, although it shouldn't. But if I select a regular table, then @output is NOT null, so it seems very suspicious it's the temp table.
What gives??
Thanks