Hi,
Is there a way of applying the contents of a table as paramters to a system stored procedure?
For Instance if I use the code....
SELECT sd.name FROM sys.databases sd
INNER JOIN
sys.syslogins sl
ON sd.owner_sid = sl.sid
WHERE sl.name <> 'sa'
I can produce a table that contians all user database. Now I want to be able to execute the SP master.dbo.sp_addumpdevice
on each of the databases in the table.
How can I do this without using cursors? or loops? is it possible?
Start Free Trial