aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/update/pre004297-1-naplo.sql
diff options
context:
space:
mode:
authorM.Gergo2019-03-08 21:20:34 +0100
committerM.Gergo2019-03-08 21:20:34 +0100
commitf51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0 (patch)
treee13e60e4b94a3b58f1e2bfbe271102c8f04b67bd /mayor-orig/update/pre004297-1-naplo.sql
parentc76a004b0135786f2742283f8d5f917106f58bd8 (diff)
downloadmayor-f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0.tar.gz
mayor-f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0.zip
további rendrakás
Diffstat (limited to 'mayor-orig/update/pre004297-1-naplo.sql')
-rw-r--r--mayor-orig/update/pre004297-1-naplo.sql53
1 files changed, 0 insertions, 53 deletions
diff --git a/mayor-orig/update/pre004297-1-naplo.sql b/mayor-orig/update/pre004297-1-naplo.sql
deleted file mode 100644
index 9ce4b801..00000000
--- a/mayor-orig/update/pre004297-1-naplo.sql
+++ /dev/null
@@ -1,53 +0,0 @@
-DROP FUNCTION IF EXISTS getOraTolTime;
-DELIMITER //
- CREATE FUNCTION getOraTolTime(id int(10) unsigned)
- RETURNS TIME DETERMINISTIC
- BEGIN
- DECLARE oraTolTime TIME;
-
- SELECT DISTINCT tolTime FROM
- (SELECT ora.*,osztalyDiak.osztalyId, osztalyDiak.diakId, %INTEZMENYDB%.csengetesiRend.csengetesiRendTipus,
- tolTime, igTime FROM ora
- LEFT JOIN %INTEZMENYDB%.tankorDiak ON (ora.tankorId = tankorDiak.tankorId AND tankorDiak.beDt<=ora.dt AND (tankorDiak.kiDt IS NULL or tankorDiak.kiDt>=ora.dt))
- LEFT JOIN %INTEZMENYDB%.osztalyDiak ON (tankorDiak.diakId = osztalyDiak.diakId AND tankorDiak.beDt<=ora.dt AND (osztalyDiak.kiDt IS NULL or osztalyDiak.kiDt>=ora.dt))
- LEFT JOIN %INTEZMENYDB%.osztaly ON (osztalyDiak.osztalyId = osztaly.osztalyId)
- LEFT JOIN %INTEZMENYDB%.telephely USING (telephelyId)
- LEFT JOIN %INTEZMENYDB%.csengetesiRend ON (telephely.telephelyId = csengetesiRend.telephelyId AND naplo_vmg_2017.ora.ora=csengetesiRend.ora)
- WHERE oraId = id) AS a
- LEFT JOIN munkatervOsztaly USING (osztalyId)
- LEFT JOIN nap ON (nap.dt=a.dt AND nap.munkatervId=munkatervOsztaly.munkatervId)
- WHERE nap.csengetesiRendTipus = a.csengetesiRendTipus
- LIMIT 1
- INTO oraTolTime;
-
- RETURN (oraTolTime);
- END
- //
-DELIMITER ; //
-
-DROP FUNCTION IF EXISTS getOraIgTime;
-DELIMITER //
- CREATE FUNCTION getOraIgTime(id int(10) unsigned)
- RETURNS TIME DETERMINISTIC
- BEGIN
- DECLARE oraIgTime TIME;
-
- SELECT DISTINCT igTime FROM
- (SELECT ora.*,osztalyDiak.osztalyId, osztalyDiak.diakId, %INTEZMENYDB%.csengetesiRend.csengetesiRendTipus,
- tolTime, igTime FROM ora
- LEFT JOIN %INTEZMENYDB%.tankorDiak ON (ora.tankorId = tankorDiak.tankorId AND tankorDiak.beDt<=ora.dt AND (tankorDiak.kiDt IS NULL or tankorDiak.kiDt>=ora.dt))
- LEFT JOIN %INTEZMENYDB%.osztalyDiak ON (tankorDiak.diakId = osztalyDiak.diakId AND tankorDiak.beDt<=ora.dt AND (osztalyDiak.kiDt IS NULL or osztalyDiak.kiDt>=ora.dt))
- LEFT JOIN %INTEZMENYDB%.osztaly ON (osztalyDiak.osztalyId = osztaly.osztalyId)
- LEFT JOIN %INTEZMENYDB%.telephely USING (telephelyId)
- LEFT JOIN %INTEZMENYDB%.csengetesiRend ON (telephely.telephelyId = csengetesiRend.telephelyId AND naplo_vmg_2017.ora.ora=csengetesiRend.ora)
- WHERE oraId = id) AS a
- LEFT JOIN munkatervOsztaly USING (osztalyId)
- LEFT JOIN nap ON (nap.dt=a.dt AND nap.munkatervId=munkatervOsztaly.munkatervId)
- WHERE nap.csengetesiRendTipus = a.csengetesiRendTipus
- LIMIT 1
- INTO oraIgTime;
-
- RETURN (oraIgTime);
- END
- //
-DELIMITER ; //