DROP PROCEDURE  IF EXISTS uspGetTanevekEugyintezes 
GO

CREATE PROCEDURE uspGetTanevekEugyintezes
   @pIntezmenyId INT
AS
BEGIN
  SET NOCOUNT ON;

  SELECT ID AS KretaAzonosito
    ,C_AKTIV AS Aktiv
    ,C_KOVETKEZO AS Kovetkezo
    ,C_NEV AS Nev
    ,C_KEZDONAP AS Kezdete
    ,C_UTOLSONAP AS Vege
  FROM T_TANEV_OSSZES Tanev
  WHERE Tanev.TOROLT = 'F'
    AND C_ISKIVALASZTHATO = 'T'
    AND C_INTEZMENYID = @pIntezmenyId
END
GO


