本帖最后由 f152520843 于 2011-11-16 11:17:25 编辑

解决方案 »

  1.   

    case when promotionid1 is null then '' else promotionid1 end ||
    case when promotionless1 is null then '' else '-' || promotionless1 || ',' end ||
    ...
      

  2.   

    replace(a,'-0',''); a是你的字段!
      

  3.   

    如果是空则如上写,如果是0
    case when promotionid1 = 0 then '' else promotionid1 end ||
    case when promotionless1 = 0 then '' else '-' || promotionless1 || ',' end ||
    ...