随笔-71  评论-5  文章-0  trackbacks-0
str.append(" left join (
select customer_no,(case  when auth_type=1 then count(route) when auth_type=2 then count(route) when auth_type=3 then count(route) end) as auth_image from h_auth_info where audit_sign=1) h6
");




select  auth_info.customer_no,
(case when auth_info.auth_image=3 then 1 
      when auth_info.auth_image<3 then 0 
end)
as auth_result
from(
select customer_no,
(case  when auth_type=1 then count(route) 
       when auth_type=2 then count(route) 
       when auth_type=3 then count(route) 
 end) 
as auth_image 
from h_auth_info 
where audit_sign=1  and customer_no='18632116655'
)  auth_info
posted on 2014-12-26 09:14 藤本蔷薇 阅读(193) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: