This commit is contained in:
2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'NCI_TanitasiOra_TanevId_IntezmenyId_OraKezdete_OraVege') BEGIN
CREATE INDEX NCI_TanitasiOra_TanevId_IntezmenyId_OraKezdete_OraVege
ON T_TANITASIORA (
C_TANEVID
,C_INTEZMENYID
,C_ORAKEZDETE
,C_ORAVEGE
)
WHERE TOROLT = 'F'
WITH (FILLFACTOR = 80)
END
GO

View File

@@ -0,0 +1,21 @@
IF OBJECT_ID('uspTanuloMulasztasParhuzamosOra') IS NOT NULL
DROP PROCEDURE uspTanuloMulasztasParhuzamosOra
GO
CREATE PROCEDURE dbo.uspTanuloMulasztasParhuzamosOra
@pTanoraId int
,@pIdoszakKezdete datetime
,@pIdoszakVege datetime
AS
BEGIN
DECLARE @hianyzasTipus int=1500
,@kesesTipus int =1499
SELECT
tm.C_ORATANULOIID TanuloId
FROM T_TANULOMULASZTAS tm
INNER JOIN T_TANITASIORA tao ON tm.C_TANITASIORAKID = tao.ID
WHERE @pIdoszakVege >= tao.C_ORAKEZDETE AND @pIdoszakKezdete <= tao.C_ORAVEGE
AND tm.C_TIPUS BETWEEN @kesesTipus AND @hianyzasTipus
AND tao.ID <> @pTanoraid
END
GO