Answer to Question #300259 in Databases | SQL | Oracle | MS Access for AISHWARYA DIPAK PAWAR

Question #300259

Write PL/SQL block to create a trigger to update the records according to working days that is you can not update record in holidays


1
Expert's answer
2022-02-24T04:24:07-0500

update a

set d = (

 select min(next_day) from (

  select h, h + 1 day as next_day from holiday where h >= '2020-04-30'

 ) x where next_day not in (select h from holiday where h >= '2020-04-30')

)



Assuming that you have created the following:

-- create table a (d date);

-- insert into a (d) values ('2020-01-01');

-- create table holiday (h date); 

-- insert into holiday (h) values ('2020-05-01');

-- insert into holiday (h) values ('2020-05-02');

-- insert into holiday (h) values ('2020-05-03');


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS