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

1 Expert Approved Answer
Step: 1 Unlock

To rewrite the SQL query using a CASE statement instead of IIF you can replace ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!