Hi Guys,
I got a problem, my left join retrieves to many values. I know there are only 252 in there that match the where
condition. If I use the table in a left join with the same where condition my row count increases.
--1176 rows
select count(erg_ID) from
myschema.T_STA_ERG sta_erg
INNER JOIN T_MEN hoechst
ON sta_erg.PARAMETER = hoechst.PARAMETER
AND sta_erg.JAHR = 2014
where sta_erg.MESSERG_KNG = 'A' AND sta_erg.MESSERG_ALPHA IN ('03') and sta_erg.NORM_MESS is null
--252 rows
select distinct erg_ID from myschema.T_STA_ERG sta_erg where sta_erg.MESSERG_KNG = 'A' AND sta_erg.MESSERG_ALPHA IN ('03') and sta_erg.NORM_MESS is null
any clue´s how I can build in conditions into my join that would not increase the row results?