小虫,俺是没看明白,楼下的呢?

解决方案 »

  1.   

    select * from v_储蓄
    order by case when 一本通号 is null and 卡号 is null then 1 --首先显示, 一本通号为空,卡号为空的帐号数据
       when 卡号 is not null then 2 --其次显示,一本通号和卡号都不为空的帐号数据,以及,一本通号为空,卡号不为空的帐号数据.
       when 一本通号 is not null then 3 --其次显示,一本通号和卡号都不为空的帐号数据,以及,一本通号为空,卡号不为空的帐号数据.
       else 4
       end,case when 一本通号 is null and 卡号 is null then 帐号
       when 卡号 is not null then 卡号
       when 一本通号 is not null then 一本通号
       else 一本通号
       end
      

  2.   

    阿海强淫,这也可以看懂需求!!!
      

  3.   


    牛人 
    拜一个
    这都能看懂
      

  4.   

    谢谢海阔兄,谢谢大家了...
    我下次一定注意格式..