I am trying to get an example working from the Stiltsoft website working and can't get it to work to save myself. The SQL is to calculate the number of working days between two dates less public holidays.
The location of the exact use case on the website can be found: https://docs.stiltsoft.com/display/public/TFAC/Custom+Transformation+-+use+cases+with+advanced+SQL+queries
However when I try and recreate this below is the result I get:
'Days' - 2 * (('Days' / 7)::integer) -
WHEN 'Days' % 7 = 0 THEN 0
WHEN 'Start date'::Date->getDay() = 0 THEN 1
WHEN 'Start date'::Date->getDay() + 'Days' % 7 = 6 THEN 1
WHEN 'Start date'::Date->getDay() + 'Days' % 7 > 6 THEN 2
(SELECT COUNT(*) FROM
(SELECT *,'Holiday'::Date->getDay() AS 'Day' FROM T2)
WHERE 'Holiday' >= TT.'Start date' AND 'Holiday' <= TT.'End date'
AND 'Day' > 0 AND 'Day' < 6)
AS 'Work days'
(SELECT *, ('End date' - 'Start date') / "1d" + 1 AS 'Days' FROM T1) AS TT
This is obviously incorrect
Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events