标签:gateway sql amount ade har acl sum to_char and
SELECT SUM(tjo.pay_amount) FROM tb_jf_order tjo,tb_jf_gateway_trade_log tjg WHERE tjo.order_id = tjg.biz_id AND tjo.user_id = tjg.user_id AND (tjg.trade_type=‘p‘ OR tjg.trade_type=‘t‘) AND tjo.user_id=‘34322‘AND tjo.order_state=‘88‘ AND tjo.order_type NOT IN (‘0024‘,‘0022‘,‘0026‘) AND tjo.order_date = to_char(SYSDATE,‘yyyyMMdd‘);
1、上述sql中如果的两个or语句一定要赢括号括起来。
标签:gateway sql amount ade har acl sum to_char and
原文地址:http://www.cnblogs.com/lijiale/p/6145617.html