Looking for expert in sql server query
Budget: $10 – $30 USD
Requirement_understanding:
There will be a separate table which holds the holidays dates.
create table holiday_table ( holiday_date date , is_holiday nvarchar(10));
insert into holiday_table (holiday_date, is_holiday) values ('2022-05-24','No'),
('2022-05-25','Yes'),('2022-05-26','Yes'),('2022-05-27','Yes');
Steps to do:
1) For each date from the Holidays array from the json, check if the date is available in holiday_table and is_holiday ='Yes' then that date is considered to be holiday so for that date have to include in output json.
2)if there are 2 sets of hours, then the output json will have 2 sets of start and end time
3) if in the input for a date the open and close time is 00:00 then in the output that date is written with no hours and "isClosed":true
refer the date '2022-05-25' for example.
Note: the code should be dynamic and should work for various inputs.
the requirement is to create select statement to read input and create output in sql server
by looking if dates are available in holiday table
There will be a separate table which holds the holidays dates.
create table holiday_table ( holiday_date date , is_holiday nvarchar(10));
insert into holiday_table (holiday_date, is_holiday) values ('2022-05-24','No'),
('2022-05-25','Yes'),('2022-05-26','Yes'),('2022-05-27','Yes');
Steps to do:
1) For each date from the Holidays array from the json, check if the date is available in holiday_table and is_holiday ='Yes' then that date is considered to be holiday so for that date have to include in output json.
2)if there are 2 sets of hours, then the output json will have 2 sets of start and end time
3) if in the input for a date the open and close time is 00:00 then in the output that date is written with no hours and "isClosed":true
refer the date '2022-05-25' for example.
Note: the code should be dynamic and should work for various inputs.
the requirement is to create select statement to read input and create output in sql server
by looking if dates are available in holiday table