SELECT t1.YPTBDM,t1.YPLSDM,t1.ypcpm,
(SELECT MIN(to_number(b.gzcsz))
FROM tb_ypwjgz_bdk a, tb_ypwjgz_bdkmx b
WHERE a.ypwjbdid = b.ypwjbdid AND a.yptbdm = t1.YPTBDM AND b.gzlx = '10') cgjg
FROM v_yppg_fbk t1
------解决思路----------------------
如果问题解决请注意及时结贴
------解决思路----------------------
-- LZ 可以考虑一下 greatest 函数,这个是取大值、
-- 例子:
select greatest(0,10) , greatest(-10,0) from dual
-- 你就得这样用:
select greatest(cgjg,0) ...