DROP PROCEDURE IF EXISTS uspGetSzirStatFromT_SZIRSTATTables
GO

CREATE PROCEDURE uspGetSzirStatFromT_SZIRSTATTables
   @pTanevId int
  ,@pIntezmenyid int
AS
BEGIN
     SELECT ID FROM T_SZIRSTATFELADATELLATASIHELY WHERE C_TANEVID = @pTanevId AND C_INTEZMENYID = @pIntezmenyid AND Torolt = 'F'
     SELECT ID FROM T_SZIRSTATTANULO WHERE C_TANEVID = @pTanevId AND C_INTEZMENYID = @pIntezmenyid AND Torolt = 'F'
     SELECT ID FROM T_SZIRSTATKONYVTAR WHERE C_TANEVID = @pTanevId AND C_INTEZMENYID = @pIntezmenyid AND Torolt = 'F'
END
GO