with data as ( select PKDate , row_number() over ( order by PKDate desc) rn from days where PKDate < trunc(sysdate) and is_workday = 1 ) select * from data where rn <= 4
Open in new window
( GREATEST ( NEXT_DAY ( v_start_date, 'MON') - v_start_date - 2, 0)
+ ((NEXT_DAY ( v_end_date, 'MON') - NEXT_DAY ( v_start_date, 'MON')) / 7) * 5)
- (GREATEST ( NEXT_DAY ( v_end_date, 'MON') - v_end_date - 3, 0))
Get your personalized solution.
Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.
*This site is protected by reCAPTCHA and the Google
Terms of Service apply.
Please enter a first name
Please enter a last name
8+ characters (letters, numbers, and a symbol)
Take hold of your future.