hi im having trouble trying to get the following function to work.
CREATE FUNCTION test ( @nt_group VARCHAR(128) )
RETURNS @nt_usr TABLE (
      [name] [nchar](128) NULL
    , [type] [char](8) NULL
    , [privilege] [char](9) NULL
    , [mapped login name] [nchar](128) NULL
    , [permission path] [nchar](128) NULL
    )
AS BEGIN 
    INSERT  INTO @nt_usr
    EXEC master.dbo.xp_logininfo 'DOMAIN\USER', @nt_group
     RETURN
   END
As far as i know i should be allowed to call an extended stored procedure, im getting the following error
Mes 443, Level 16, State 14
Could it be that xp_logininfo might return different result sets depending on the parameters? When i use openquery i can overcome this by setting this: SET FMTONLY OFF. Does anyone know if there's a similar workaround for my problem?