DROP PROCEDURE  IF EXISTS uspGetEmailCimBygondviselo 
GO

CREATE PROCEDURE uspGetEmailCimBygondviselo
   @pUserId INT
  ,@pGondviseloId INT
AS
BEGIN
  SET NOCOUNT ON;

  SELECT C_EMAILCIM
  FROM T_EMAIL_OSSZES
  WHERE TOROLT = 'F'
    AND C_FELHASZNALOID = @pUserId
    AND C_GONDVISELOID = @pGondviseloId
    AND C_ISHIBASANMEGADVA = 'F'
    AND C_ALAPERTELMEZETT = 'T'
END
GO


