DROP PROCEDURE IF EXISTS uspGetAdminId 
GO
  CREATE PROCEDURE uspGetAdminId
     @pTanevId INT
    ,@pIntezmenyId INT
    ,@pAdminUsername NVARCHAR(255)
  AS
  BEGIN
    SET NOCOUNT ON;

    SELECT f.ID
    FROM T_FELHASZNALO_OSSZES f
    WHERE f.TOROLT = 'F'
      AND f.C_TANEVID = @pTanevId
      AND f.C_NYOMTATASINEV = @pAdminUsername
      AND f.C_INTEZMENYID = @pIntezmenyId
  END
GO


