kevin.unglesbee (10/3/2013)
I just don't understand how it can work in the system SP, but I can't run the part of the code I want to use... please help.
SQL Server 2005+ doesn't allow system rowset functions to be called directly from user code. So you need to either use the documented system SPs or write your own code using SQLCLR code.