摘要: select sum(settle_pq) from G_LL_STAT GLS, G_LINE_PQ GLP,G_LINE GL,O_ORG OO ,pub_e_pq_amt p where GLS.ORG_NO like '43401'||'%' AND GLS.BGN_DATE >= TO_DATE(to_char(sysdate,'YYYY')||'0101', 'YYYYMMDD') AND GLS.BGN_DATE 0 GROUP BY (GL.LINE_ID) HAVING(MAX(GL.LIN 阅读全文
posted @ 2013-08-09 14:47 令狐冲之12 阅读(265) 评论(0) 推荐(0) 编辑
摘要: an outer join cannot be specified on a correlation columnselect( select nvl(sum(p.settle_pq),0) from pub_e_pq_amt p where p.prc_code != '00000000' and p.rcvbl_amt_id > 0 and p.line_id=gl.line_id(+) ) as 用户用电量from g_line 阅读全文
posted @ 2013-08-09 14:46 令狐冲之12 阅读(250) 评论(0) 推荐(0) 编辑