Home > database >  Date (for) two days, it is necessary to consider weekends and statutory holidays.
Date (for) two days, it is necessary to consider weekends and statutory holidays.

Time:10-06

Now has two table, a table to save the business data, one of the fields specific date/time,
Another table is perpetual calendar, one of the fields 0 (weekday, 1 represents the legal holiday,
Now how do you write statement to calculate the two periods of each business day?

CodePudding user response:

each business two periods of days
Business on the table, there are two fields are? Start and end dates?

CodePudding user response:

Suggest you list your table structure, and provide the test data, and based on these test data that corresponds to the correct result,
Refer to the way the post questions http://bbs.csdn.net/topics/320211382

1. You create table XXX.. Statement
2. You insert into XXX... Statement
3. The result is what kind, and give a simple algorithm description)
4. Do you use the database name and version of (often asked in MS SQL server edition MySQL)

So people who want to help you to build the same environment with you directly, and in providing the test before, avoid the error in the text understanding,

CodePudding user response:

Weixin_39757479
Junction post rate: 0%

reference
after your questions answered please post.
http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html

8, how to give points and knot stick?
http://bbs.csdn.net/help#post_dispose

CodePudding user response:

It is difficult to achieve in this estimate SQL, or inside the code for processing
  • Related