init
This commit is contained in:
@@ -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
|
@@ -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
|
Reference in New Issue
Block a user