=================================== A 状态下需求费用|| B状态下需求费用 ====================================
求大神,在线等,很捉急。
------解决方案--------------------
SQL code
select case when isvisit = 'A' then visitcost else 0 end as 'A 状态下需求费用',
case when isvisit = 'B' then visitcost else 0 end as 'B 状态下需求费用'
from e_member
------解决方案--------------------