﻿SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

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

CREATE PROCEDURE [dbo].[sp_Global_CreateTanevRendje20182019]
	@intezmenyId int,
	@tanevId int
AS
BEGIN
	
	SET NOCOUNT ON;
	SET DATEFIRST 1;

	INSERT [dbo].[T_TANEVRENDJE] 
		([C_AKTIV], [C_DATUM], [C_HETIREND], [C_HETNAPJA], [C_MEGJEGYZES], [C_NAPTIPUSA], [C_ORARENDINAP], [C_OSSZESCSOPORTRAVONATKOZIK], [C_CSENGETESIRENDID], [C_INTEZMENYID], [C_TANEVID], [TOROLT], [SERIAL], [LASTCHANGED], [CREATED], [MODIFIER], [CREATOR]) 
	VALUES
		(N'T', CAST(N'2018-09-01 00:00:00.000' AS DateTime), 1554, 1408, N'', 1394, N'T', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-10-13 00:00:00.000' AS DateTime), 1554, 1408, N'', 1385, N'T', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-10-22 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-10-22 00:00:00.000' AS DateTime)), N'', 6833, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-10-23 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-10-23 00:00:00.000' AS DateTime)), N'', 1396, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-10-29 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-10-29 00:00:00.000' AS DateTime)), N'', 1399, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-10-30 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-10-30 00:00:00.000' AS DateTime)), N'', 1399, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-10-31 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-10-31 00:00:00.000' AS DateTime)), N'', 1399, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-11-01 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-11-01 00:00:00.000' AS DateTime)), N'', 1386, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-11-02 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-11-02 00:00:00.000' AS DateTime)), N'', 6833, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-11-10 00:00:00.000' AS DateTime), 1554, 1412, N'', 1385, N'T', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-12-01 00:00:00.000' AS DateTime), 1554, 1408, N'', 1385, N'T', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-12-15 00:00:00.000' AS DateTime), 1554, 1408, N'', 1385, N'T', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-12-24 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-12-24 00:00:00.000' AS DateTime)), N'', 6833, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-12-25 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-12-25 00:00:00.000' AS DateTime)), N'', 1386, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-12-26 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-12-26 00:00:00.000' AS DateTime)), N'', 1386, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-12-27 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-12-27 00:00:00.000' AS DateTime)), N'', 1397, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-12-28 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-12-28 00:00:00.000' AS DateTime)), N'', 1397, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2018-12-31 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2018-12-31 00:00:00.000' AS DateTime)), N'', 6833, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-01-01 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-01-01 00:00:00.000' AS DateTime)), N'', 1386, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-01-02 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-01-02 00:00:00.000' AS DateTime)), N'', 1397, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-01-25 00:00:00.000' AS DateTime), 1554, 1412, N'', 1400, N'T', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-03-15 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-03-15 00:00:00.000' AS DateTime)), N'', 1396, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-04-18 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-04-18 00:00:00.000' AS DateTime)), N'', 1398, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-04-19 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-04-19 00:00:00.000' AS DateTime)), N'', 1386, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-04-22 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-04-22 00:00:00.000' AS DateTime)), N'', 1386, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-04-23 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-04-23 00:00:00.000' AS DateTime)), N'', 1398, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-05-01 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-05-01 00:00:00.000' AS DateTime)), N'', 1386, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-05-02 00:00:00.000' AS DateTime), 1554, 1411, N'', 1402, N'T', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-06-10 00:00:00.000' AS DateTime), 1554, dbo.fnGetHetNapja(CAST(N'2019-06-10 00:00:00.000' AS DateTime)), N'', 1386, N'F', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1),
		(N'T', CAST(N'2019-06-14 00:00:00.000' AS DateTime), 1554, 1412, N'', 1395, N'T', N'T', NULL, @intezmenyId, @tanevId, N'F', 0, GETDATE(), GETDATE(), NULL, 1)

END