1

我有 4 个字段(empno、jobcode、abscode、unittype)并且想在只有 unittype 不同时查找所有记录

4

2 回答 2

2
Select empno,jobcode,abscode,Count(unittype) 
from Tab
Group by empno,jobcode,abscode
Having Count(unittype)>1
于 2013-06-05T16:59:32.513 回答
0

几乎拥有它:

Select empno,jobcode,abscode,Count(Distinct unittype) 
from Tab
Group by empno,jobcode,abscode
Having Count(Distinct unittype)>1
于 2015-03-30T21:31:19.760 回答