(dbo_Attendance.Shift)="1" AS MorningShift, (dbo_Attendance.Shift)="2" AS MiddleShift, (dbo_Attendance.Shift)="3" AS NightShift,
在查询里加了这三个字段。大意就是当dbo_Attendance.Shift=1时存入MorningShift ,以此类推。
为什么返回都是负值呢?如图。请各位人心人帮忙。Thanks。
原帖由 咱家是猫 于 2008-3-15 09:01 发表
IIF([Shift]=1,[Shift],0) AS MorningShift, IIF([Shift]=2,[Shift],0) AS MiddleShift, IIF([Shift]=3,[Shift],0) AS NightShift,
谢谢楼上的思路。正确的为: IIf([dbo_Attendance.Shift]="1",1,0) AS MorningShift, IIf([dbo_Attendance.Shift]="2",1,0) AS MiddleShift, IIf([dbo_Attendance.Shift]="3",1,0) AS NightShift