Question: Problem 1 Show all customers and display whether they placed an order in the first week of December 2017 select c.CustomerID, c.CustFirstName + ' '
Problem 1 Show all customers and display whether they placed an order in the first week of December 2017
select c.CustomerID, c.CustFirstName + ' ' + c.CustLastName as CustomerName,
iif(CustomerID in (
select o.CustomerID from orders as o
where o.OrderDate>= '2017-12-01'
and o.OrderDate<='2017-12-07' ),
'Customer ordered','Customer did not order')
as Order_Status
from customers as c
How to use this in CASE Query instead of IIF
Step by Step Solution
There are 3 Steps involved in it
To rewrite the SQL query using a CASE statement instead of IIF you can replace ... View full answer
Get step-by-step solutions from verified subject matter experts
