68 369
Assignments Done
98,7%
Successfully Done
In November 2018

Answer to Question #74701 in Databases | SQL | Oracle | MS Access for Mychal Johnson

Question #74701
Make a Update Query that will add the phrase "Free Champagne for this Preferred Guest" to the Comments field, but only if the guest stays for days or more.

CHECK-IN DATE CHECK-OUT DATE
2/28/2018 3/28/2018
3/27/2018 3/31/2018
3/5/2018 3/17/2018
3/1/2018 3/3/2018
3/11/2018 3/15/2018
3/6/2018 3/14/2018
4/8/2018 4/19/2018
3/5/2018 3/10/2018
3/11/2018 3/17/2018
3/22/2018 3/24/2018
3/18/2018 3/24/2018
2/28/2018 3/3/2018
3/18/2018 3/24/2018
3/19/2018 3/30/2018
3/18/2018 3/23/2018
3/1/2018 3/3/2018
3/4/2018 3/9/2018
Expert's answer
Answer1:
UPDATE phrase
SET
Comments = 'Free Champagne for this Preferred Guest'
where
(date between '2/28/18' and '3/28/2018' ) or
(date between '3/27/2018' and '3/31/2018') or
(date between '3/5/2018' and '3/17/2018' ) or
(date between '3/1/2018' and '3/3/2018' ) or
(date between '3/11/2018' and '3/15/2018' ) or
(date between '3/6/2018' and '3/14/2018' ) or
(date between '4/8/2018' and '4/19/2018') or
(date between '3/5/2018' and '3/10/2018' ) or
(date between '3/11/2018' and '3/17/2018' ) or
(date between '3/22/2018' and '3/24/2018' ) or
(date between '3/18/2018' and '3/24/2018' ) or
(date between '2/28/2018' and '3/3/2018') or
(date between '3/18/2018' and '3/24/2018') or
(date between '3/19/2018' and '3/30/2018' ) or
(date between '3/18/2018' and '3/23/2018' ) or
(date between '3/1/2018' and '3/3/2018' ) or
(date between '3/4/2018' and '3/9/2018')

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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions