如何在ms中“分组”重命名字段 - 访问

时间:2013-04-05 09:55:36

标签: ms-access

我有这个选择在访问

的工作
 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分组此选项并且代码I保持错误

1 个答案:

答案 0 :(得分: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