0

我有这个选择在访问中运行良好

 select case when ziffer = '042'  then 0 else 1 end as ID,
        case when ziffer = '042'  then 'Fiktiv' else 'Regelbesteuert' end as Code 
 from MWST_Code

如果我尝试按 ID 和代码对此选择进行分组,则会出现错误

4

1 回答 1

1

如果您访问支持案例声明,请尝试这样做:

 select case when ziffer = '042'  then 0 else 1 end as ID, 
      case when ziffer = '042'  then 'Fiktiv' else 'Regelbesteuert' end as Code
      from MWST_Code 
      group by case when ziffer = '042'  then 0 else 1 end, 
           case when ziffer = '042'  then 'Fiktiv' else 'Regelbesteuert' end
于 2013-04-05T16:18:12.090 回答