SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF OBJECT_ID('[dbo].[sp_GetNebuloErtesitoStatusz]') IS NOT NULL
BEGIN
	DROP PROCEDURE [dbo].[sp_GetNebuloErtesitoStatusz]
END
GO

CREATE PROCEDURE [dbo].[sp_GetNebuloErtesitoStatusz]
	-- Add the parameters for the stored procedure here
	 @intezmenyId	INT
	,@tanevId		INT
	,@statusz		INT
AS	
BEGIN

	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	SELECT 
		ID				NebuloId
	FROM 
		T_NEBULO_OSSZES
	WHERE 
			TOROLT = 'F'
		AND C_TANEVID = @tanevId
		AND C_INTEZMENYID = @intezmenyId
		AND C_FELVETELSTATUSZA = @statusz 

END

GO

