I would like to know why I can't run openrowset the way that system stored procedures do? For example, in sys.xp_logininfo, they use it. When I try to copy the part of the code from that SP for use in my code, it gives me the error:
Msg 156, Level 15, State 17, Line 16
Incorrect syntax near the keyword 'OPENROWSET'.
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.