IIF of access

Source: Internet
Author: User
To make the company's attendance public, you need to write a small page that uses the access file shared by the front-end computer. The page must be able to directly determine whether the employee's work time is equal to the standard,
I got everything done in a statement. As a result, I found a strange problem. The same function IIF can be implemented for the part that gets off work, and there is a problem for the part where I go to work. It is actually ghost. Select
B. tp_ B, B .m _ T, B .a _ t,
IIF (format (B. A _ T, 'hh: NN: ss')> #18:00:00 #, 'normal', 'Leave early ') as type_a,
IIF (format (B .m _ T, 'hh: NN: ss')> #09:05:00 #, 'latest', 'normal') as type_m
From
(Select
Max (tp_a) as a_T, min (tp_a) as M_t, tp_ B
From (
Select
Format (checkinout. checktime, 'hh: NN: ss') as tp_a,
Format (checkinout. checktime, 'yyyy-mm-dd') as tp_ B,
Userinfo. Name
From
(Checkinout inner join userinfo on checkinout. userid = userinfo. userid)
Where
(Userinfo. userid = 7) and (checkinout. checktime >#4/1/2008 #)
Group by tp_ B) as B

Unexpectedly, the data showed that it was normal to be able to exit early, but it was very depressing to be late. I submitted a separate statement and changed the position, which could not achieve normal response, depressing...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.