﻿
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

DROP TABLE IF EXISTS [dbo].[T_ORARENDTELJES]
GO

CREATE TABLE [dbo].[T_ORARENDTELJES](
	[C_INTEZMENYID] [int] NOT NULL,
	[C_TANEVID] [int] NOT NULL,
	[C_DATUM] [datetime] NOT NULL,
	[C_ORARENDIORAID] [int] NOT NULL,
	[C_ORARENDIORAGROUPID] [int] NULL,
	[C_OSZTALYCSOPORTID] [int] NULL,
	[C_FELADATKATEGORIAID] [int] NULL,
	[C_TANTARGYID] [int] NULL,
	[C_ISOSZTALYORARENDBENEMLATSZIK] [char](1) NULL,
	[C_TANARID] [int] NULL,
	[C_TEREMID] [int] NULL,
	[C_ORASZAM] [int] NULL,
	[C_CSENGETESIRENDID] [int] NULL,
	[C_BONTOTT] [char](1) NULL,
	[C_HETIREND] [int] NULL,
	[C_HETNAPJA] [int] NULL,
	[C_HETSORSZAMA] [int] NULL,
	[C_NAPDATUMA] [datetime] NULL,
	[C_ORAERVENYESSEGKEZDETE] [datetime] NULL,
	[C_ORAERVENYESSEGVEGE] [datetime] NULL,
	[C_ORAKEZDETE] [datetime] NULL,
	[C_ORAVEGE] [datetime] NULL,
	[C_EGYEDINAP] [char](1) NULL,
	[C_KOZPONTIORAGROUPID] [uniqueidentifier] NULL,
	[C_KOZPONTILAGTOROLTORAGROUPID] [uniqueidentifier] NULL,
	[C_HELYETTESTANAROKID] [int] NULL,
	[C_HELYETTESITESID] [int] NULL,
    CONSTRAINT PK_OrarendTeljes PRIMARY KEY CLUSTERED (
	    [C_INTEZMENYID] ASC,
	    [C_TANEVID] ASC,
	    [C_DATUM] ASC,
	    [C_ORARENDIORAID] ASC
    ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)
GO

EXEC dev.uspCreateSchemaViews 'T_ORARENDTELJES'
GO
