浮空情况

时间:2019-05-07 08:33:51

标签: sql sql-server

在下面的代码IN ELSE中,如果我不想传递'NOTEQUAL'并传递浮点NULL值怎么办

select from table as A {
  A.objek,
  max(case when A.atinn = '0000010530' then  fltp_to_dec( A.atflv as abap.dec(5,3) else <what to enter here for null or no values > end ) as DDC
}
group by A.objek

1 个答案:

答案 0 :(得分:1)

如果需要NULL,则使用NULL

select from table as A {
  A.objek,
  max(case when A.atinn = '0000010530' 
      then  fltp_to_dec( A.atflv as abap.dec(5,3) 
      else NULL end ) as DDC
}
group by A.objek

或Larnu建议的任何内容

select from table as A {
  A.objek,
  max(case when A.atinn = '0000010530' 
      then  fltp_to_dec( A.atflv as abap.dec(5,3) 
      end ) as DDC
}
group by A.objek