Code:
SELECT Month1.CUIC,
Month1.Region,
Month1.Branch,
Month1.Assign,
Month1.RoleCD,
Month1.[CIR Name],
Month1.[Call Number],
Month1.[Self Ref Number],
Month1.Type AS Type1,
Month1.FVF,
Month1.[POP Line],
Month1.[Urg CD],
Month1.CNT,
Month1.[Opn-Date],
Month1.[Opn-Time],
Month1.[Cmp-Date],
Month1.[Cmp-Time],
Month1.[Sys-Cmp-Date],
Month1.[Sys-Cmp-Time],
Month1.[Rep-Style],
Month1.[Rep-Serial-number],
Month1.[CIR-Serial-number],
Month1.[Customer Name],
Month1.[Problem Description],
Month1.Resolution,
[Non prod Hrs]+[Prod act Hrs] AS [Call Time],
Month1.[Travel Hrs],
Month1.Distance,
Month1.Pcode,
Month1.[Prod act Hrs],
Month1.NPcode,
Month1.[Non prod Hrs] AS [Non prod Hrs1],
IIf([NPcode]=43 Or [NPcode]=45 Or [NPcode]=61,[Non prod Hrs1],0) AS [Non prod Hrs],
Month1.[Emp ID],
Month1.[Tel-Type],
Month1.[Ons-Type],
Month1.[Res-Type],
IIf([Urg CD] Like "IN*","Install",
IIf([Res-Type] Like "#*BD*","Other",
IIf([Customer Name] Like "*EMC*","EMC",
IIf([ProbStyle] Like "DELLSERVERS*","ESF",
IIf([ProbStyle] Like "*SRV*","SBD",
IIf([Indicator1]=1,"NBD",
IIf([Indicator2]=3,"SBD",
IIf([Blank]="5","NBD",
IIf([Indicator1]=3,"UTS","NBD"))))))))) AS Type,
Month1.[IA Number],
Month1.City,
Month1.State,
Month1.Zipcd,
Month1.NAID,
Month1.ProbStyle,
Month1.Address,
[Call Time]+[Travel Hrs] AS [Total Time],
IIf([RoleCD]="W00564" Or [RoleCD]="W00565" Or [RoleCD]="W00566" Or [RoleCD]="W00567" Or [RoleCD]="W00568" Or [RoleCD]="W00569" Or [RoleCD]="W00611" Or [RoleCD]="W00613" Or [RoleCD]="W00614" Or [RoleCD]="W00615" Or [RoleCD]="W00696" Or [RoleCD]="W00697" Or [RoleCD]="W00698" Or [RoleCD] Like "ZZ*","CIR",IIf([RoleCD] Like "TP*" Or [RoleCD] Like "XX*","Contractor",IIf([RoleCD]="W00298" Or [RoleCD]="W00299" Or [RoleCD]="W00426" Or [RoleCD]="W00427" Or [RoleCD]="W00455" Or [RoleCD]="W00649" Or [RoleCD]="W00652","CRC",IIf([RoleCD]="W00300" Or [RoleCD]="W00304" Or [RoleCD]="W00305" Or [RoleCD]="W00306" Or [RoleCD]="W00307" Or [RoleCD]="W00323" Or [RoleCD]="W00475","CSC",IIf([RoleCD]="W00345" Or [RoleCD]="W00346" Or [RoleCD]="W00347" Or [RoleCD]="W00348" Or [RoleCD]="W00349" Or [RoleCD]="W00350","SDM","Other"))))) AS [Employee type],
IIf([Urg CD]="ND" And [Customer Name] Like "Dell/*","3",
IIf([Res-Type] Like "*BD" Or [Ons-Type] Like "*BD" Or [Ons-Type] Like "NSL" Or [Res-Type] Like "NSL",1,2)) AS Indicator1,
IIf([Indicator1]>1 And [Ons-Type]<"1600",3,4) AS Indicator2,
IIf(IsNull([Res-Type]) And ([Ons-Type])," ","5") AS Blank, Weekday([Cmp-Date]) AS [Day of week],
IIf([Res-Type] Like "#*BD*",1,2) AS Indicator3
FROM Month1;
I've split out your query so it's easier to see the formulas (at least for me.