我正在尝试做一个简单的加入,但我不确定这里发生了什么。我有两个表:pend_bominv_det 有 305 行,alldet 有大约 12k
我正在尝试从 pend_bominv_det 中获取所有 305 条记录,并且仅从 alldet 中获取与索赔号匹配的记录。有任何想法吗?
select distinct c_clm
,manager_name
,'exp_bom' as categ
,time_prd_nm
,report_month
,report_year
,report_end_date
from IN.pend_bominv_det a
left outer join IN.alldet
on a.pearl_clmno = c_clm
where a.pearl_clmno is not null
and time_prd_nm = 'WEEK 2'