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
1
Expert's answer
2018-03-19T08:53:47-0400
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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS