据我了解,由于where子句,此查询运行时不会填充任何数据任何次数
@angular/common
在我看来,在表where c.company_id = lot.company_id
and p.product_id = lot.product_id
and l.packlevel_id = lot.packlevel_id
为空的一开始,where子句将返回空数据,因为它不会在空表中找到任何东西,并且每次都会发生。我的理解错了吗?
fact_table_lot
答案 0 :(得分:1)
在您的查询staging_serials s left outer join fact_table_lot lot on s.lotnumber= lot.l_num
中,将给出包含staging_serials
中所有记录的结果集,并且由于事实表中的事实表中的列为空null值。如果您不希望返回任何记录,请使用inner join
而不是left join
。