Je crois que vous essayez de filtrer des valeurs telles que 07-AUG-15
mais votre modèle similaire indique 07_%
. Cela devrait être
gal.name not like '07-%'
De plus, votre dernière partie comme indiqué ci-dessous n'a aucun sens; vous devriez plutôt inclure ces conditions dans la requête principale WHERE
clause.
and ( exists (select FIRSTNAME
from TCPD_PERSONEL_COPY
where (gal.name not like '07_%' AND
gal.name not like 'TR_%' AND
gal.name not like 'ST_%' AND
gal.name not like 'KB_%' AND
gal.name not like 'HS_%' AND
gal.name is not null))
Votre SELECT
devrait ressembler
SELECT SUBSTR(NAME, 1, 50),SUBSTR( GIVEN_NAME, 1, 50), DEPARTMENT, PHONE, SUBSTR(MAIL, 1, 100), SUBSTR(LOGIN, 1, 255), SYSDATE
FROM gal
WHERE ( NOT EXISTS (SELECT EMAIL1
FROM TCPD_PERSONEL_COPY
WHERE GAL.mail = TCPD_PERSONEL_COPY.email1)
OR NOT EXISTS (SELECT userid
FROM TCPD_PERSONEL_COPY
WHERE gAL.LOGIN = TCPD_PERSONEL_COPY.userid))
AND GAL.mail IS NOT NULL AND GAL.COUNTRY='GERMANY'
AND ( gal.name not like '07_%' OR
gal.name not like 'TR_%' OR
gal.name not like 'ST_%' OR
gal.name not like 'KB_%' OR
gal.name not like 'HS_%' OR
gal.name is not null);