select w.wo_nbr, a.spec_prpty_value from cidp_hnwfm_user.wo w left join cidp_hnwfm_user.so_main_prod b on (w.so_nbr = b.so_nbr and b.no_flag = 'A'), cidp_hnwfm_user.so_main_prod b left join cidp_hnwfm_user.so_main_prod_prpty a on (b.so_main_prod_id = a.so_main_prod_id and a.spec_prpty_id = '12') where w.wo_type = 'N' and w.work_mode = 'M' and w.compl_date between trunc(sysdate - 1) and trunc(sysdate + 1) - 1 / 24 / 60 / 60;这样好像不对
select w.wo_nbr,a.spec_prpty_value from cidp_hnwfm_user.wo w left join cidp_hnwfm_user.so_main_prod b on w.so_nbr = b.so_nbr left join cidp_hnwfm_user.so_main_prod_prpty a on b.so_main_prod_id = a.so_main_prod_id and a.spec_prpty_id = '12' and b.no_flag = 'A' where w.compl_date between trunc(sysdate-1) and trunc(sysdate+1)-1/24/60/60
from cidp_hnwfm_user.wo w
left join cidp_hnwfm_user.so_main_prod b on (w.so_nbr = b.so_nbr
and b.no_flag = 'A'), cidp_hnwfm_user.so_main_prod b
left join cidp_hnwfm_user.so_main_prod_prpty a on (b.so_main_prod_id =
a.so_main_prod_id and
a.spec_prpty_id = '12')
where
w.wo_type = 'N'
and w.work_mode = 'M'
and w.compl_date between trunc(sysdate - 1) and
trunc(sysdate + 1) - 1 / 24 / 60 / 60;这样好像不对
from cidp_hnwfm_user.wo w
left join
cidp_hnwfm_user.so_main_prod b
on w.so_nbr = b.so_nbr
left join
cidp_hnwfm_user.so_main_prod_prpty a
on b.so_main_prod_id = a.so_main_prod_id
and a.spec_prpty_id = '12'
and b.no_flag = 'A'
where w.compl_date between trunc(sysdate-1) and trunc(sysdate+1)-1/24/60/60