Remove redundant Access field cells

纵饮孤独 提交于 2019-12-02 09:12:25
SELECT ID, N1 &
  IIf(N2 <> N1, N2, '') &
  IIf((N3 <> N2) And (N3 <> N1), N3, '') AS Name_Final
FROM
  (SELECT ID, Nz(Name_2010) AS N1, Nz(Name_2011) AS N2, Nz(Name_2012) AS N3
   FROM Table1) AS T
ORDER BY ID;

The ORDER BY clause is for what it says, rather than being a part of the 'Name_Final' calculation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!