Home > database >  Help: how to realize the ORACLE database?
Help: how to realize the ORACLE database?

Time:09-23



Unit time sheets as shown above, including name, check in date, sign in and sign back time, if the demand is sign back on the day of night after 8:00, the second day can postpone late not late, but not more than noon 13:00, 21:55 agreement signing back last night, for example, the sqlstate this morning before the unit is not included in the late, want to according to the business logic correct original time sheets, but don't know how to achieve more than one table records changes, consult each ace to give directions, thank you.

CodePudding user response:

This holiday, weekend is how to come out, such as: sign back Friday night after 8:00, which can a late next week?

CodePudding user response:

And ask for leave and forget to sign back, and so on and so forth is how to consider

CodePudding user response:

Can you add a table drill

CodePudding user response:

For sign back Friday night, a day after need to check-in, normal rules only consider working days, to ask for leave, travel, etc., in principle is the second day should only be modified by 13 o 'clock checkins,

CodePudding user response:

Since the attendance, so data must not
First use row_number according to ordered by date and name, calculate the scope of the second day of attendance at the same time, and then calculated according to the lead function can get you to the late arrival of the information

CodePudding user response:

Using lag or lead, the order by checkdate, then grouped according to the name, can be relatively easy to implement the requirements
  • Related