From a8f9247a1cd053fe883efb9ad7147e4228614166 Mon Sep 17 00:00:00 2001 From: Daniel Quathamer Date: Tue, 24 Sep 2024 10:02:54 +0200 Subject: [PATCH] Bugfix historical orgunits duplicates #319109 --- .../schluesseltabellen/release_unloads/fm_templates.unl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/fm_templates.unl b/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/fm_templates.unl index db94630..7e11a06 100644 --- a/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/fm_templates.unl +++ b/superx/WEB-INF/conf/edustore/db/install/schluesseltabellen/release_unloads/fm_templates.unl @@ -598,12 +598,14 @@ and T.sourcesystem=${Quellsystem_var} \ update tmp_cifx2 set apnr=(select min(apnr) from cifx T\ where T.uniquename=tmp_cifx2.uniquename\ and T.key=tmp_cifx2.key\ +and T.sourcesystem !=tmp_cifx2.sourcesystem\ and today() between T.d_akt_von and T.d_akt_bis\ )\ where apnr is null \ and 0 < (select count(*) from cifx T\ where T.uniquename=tmp_cifx2.uniquename\ and T.key=tmp_cifx2.key\ +and T.sourcesystem !=tmp_cifx2.sourcesystem\ and today() between T.d_akt_von and T.d_akt_bis\ )\ ;\ @@ -1150,12 +1152,14 @@ and T.sourcesystem=${Quellsystem_var} \ update tmp_cifx2 set apnr=(select min(apnr) from cifx T\ where T.uniquename=tmp_cifx2.uniquename\ and T.key=tmp_cifx2.key\ +and T.sourcesystem !=tmp_cifx2.sourcesystem\ and today() between T.d_akt_von and T.d_akt_bis\ )\ where apnr is null \ and 0 < (select count(*) from cifx T\ where T.uniquename=tmp_cifx2.uniquename\ and T.key=tmp_cifx2.key\ +and T.sourcesystem !=tmp_cifx2.sourcesystem\ and today() between T.d_akt_von and T.d_akt_bis\ )\ ;\