-1

我正在尝试做一个简单的加入,但我不确定这里发生了什么。我有两个表: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'
4

1 回答 1

0

pend_bominv_det 表中是否可能存在多个相同索赔编号的实例?我认为您应该在这里使用正确的连接。

希望这可以帮助

于 2013-05-22T17:16:41.560 回答