Hello,
I am trying to create the following function
CREATE FUNCTION ufn_space()
RETURNS @Results TABLE (Drive CHAR(1),DBFree INT)
AS
BEGIN
INSERT INTO @Results EXEC master.dbo.xp_fixeddrives
RETURN
END
GO
getting the error
Server: Msg 197, Level 15, State 1, Procedure fn_fixeddrives, Line 13
EXECUTE cannot be used as a source when inserting into a table variable.
Is there any way to store the results in table return the table (not through the stored procedure)