开发者

Oracle : How can i find the holiday in a business day?

Consider there are 3 different centers across the country,which have their different holidays schedule.Now i want to find that the current date is the business day or not(eliminate saturaday ,sunday and Holidays).

tell me,Which one is feasible? Can i store the details of the holiday with description in 3 separate tables for 3 differ开发者_运维问答ent centers or in a 3 separate file? is it possible to read the file using PL\SQl?


You can create 2 additional tables, say PLACE and HOLIDAYS, 1 PLACE = many HOLIDAYS

PLACE will have 3 records which will correspond to the place of your centers which have different holidays. Each record in PLACE table will have corresponding holiday schedule e.g. create MONTH and DAY columns so you can query them and compare them to your current date.

This will make your design flexible rather than hardcoding 3 separate tables for 3 different centers. Later if you add a center in a place with different holiday schedule, you can just add a record instead of creating another table.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜