For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
I have installed oracle linux version 7.5
Then I want to sync the time with windows ntp server /etc: 192.168.1.5/
What command can I use to set the ntp server?
Hi, @newuser11 Whenever you have a question, please post a little sample data in a usable form (such as CREATE TABLE and INSERT statements), so the people who want to help you car re-create the problem and test their ideas. Also post the exact results you want from the given data, and an explanation (in general terms) of how you get those results from that data. Always say which version of Oracle you're using (e.g. 12.2.0.1.0). least(7-to_char(FORECASTED_START_DATE,'DAY','NLS_DATE_LANGUAGE=''numeric date language''')+1,2) +greatest (to_char (ACTUAL_COMPLETION_DATE,'DAY','NLS_DATE_LANGUAGE=''numeric date language''')-5,0) + ((trunc(ACTUAL_COMPLETION_DATE,'IW')-trunc(FORECASTED_START_DATE,'IW'))/7-1)*2 as Weekend_Count That looks like you might calculate how many weekend days are in a range without using a calendar table. Since you do have a calendar table, it's simpler just to use it, especially since you have to use the calendar table anyway, to get the holiday information.
What is a "type 2 table"? Anyway - why are you trying to calculate total days, then holiday days and weekend days separately, and then holidays that fall on a weekend, and play with those numbers to get the result? Why not simply select count(*) from the calendar table, where the dates are between the job start date and the job end date and both flags (for "holiday" and "weekend") are 'N' ? Isn't that a trivial computation? Or do you not "see" this trivial solution?