A
Andrew.j.wilkinson
Hi all,
I would like to know how I can us code to replace IIF
statments I use via the "field" section of the QBE window
of some of my queries. I use the IIF to force ouputs
when a particular criteria is true/false.
Heres an example
Start SLA Status: IIf([Customer Commitment Date] Is Not
Null,"SLA Achieved",IIf([StartDateTime] Is Null And
[ApprovalDatetime] Is Null,"No Times Recorded",IIf
([StartDateTime] Is Null,"Start Not Recorded",IIf
([ApprovalDateTime] Is Null,"Approval Not Recorded",IIf
([ApprovalDateTime]>=[StartDateTime],"SLA Achieved",IIf
(DateDiff("n",[ApprovalDateTime],[StartDateTime])<=
[stdStartTime],"SLA Achieved","SLA Missed"))))))
This is obviously very cumbersome and confusing. I feel
a case statement might be a better option but don't know
how I can do this through a query. The result of this
query is exported to an XLS spreadsheet and used later
for analysis.
Hope this is clear enough. Look forward to your reply
Thanks
Andy
I would like to know how I can us code to replace IIF
statments I use via the "field" section of the QBE window
of some of my queries. I use the IIF to force ouputs
when a particular criteria is true/false.
Heres an example
Start SLA Status: IIf([Customer Commitment Date] Is Not
Null,"SLA Achieved",IIf([StartDateTime] Is Null And
[ApprovalDatetime] Is Null,"No Times Recorded",IIf
([StartDateTime] Is Null,"Start Not Recorded",IIf
([ApprovalDateTime] Is Null,"Approval Not Recorded",IIf
([ApprovalDateTime]>=[StartDateTime],"SLA Achieved",IIf
(DateDiff("n",[ApprovalDateTime],[StartDateTime])<=
[stdStartTime],"SLA Achieved","SLA Missed"))))))
This is obviously very cumbersome and confusing. I feel
a case statement might be a better option but don't know
how I can do this through a query. The result of this
query is exported to an XLS spreadsheet and used later
for analysis.
Hope this is clear enough. Look forward to your reply
Thanks
Andy