PrepAway - Latest Free Exam Questions & Answers

How should you complete the Transact-SQL statement?

DRAG DROP
You have a database that contains the following tables:

A delivery person enters an incorrect value for the CustomerID column in the Invoices table and enters the
following text in the ConfirmedReceivedBy column: “Package signed for by the owner Tim.”
You need to find the records in the Invoices table that contain the word Tim in the CustomerName field.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL
segments to the correct locations. Each Transact-SQL segment may be used once, more than once, or not at
all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
Box 1:SELECT CustomerID FROM Sales.Invoices
Box 2:INNER JOIN Sales.Customers.CustomerID = Sales.Invoices.CustomerID
Box 3:WHERE CustomerName LIKE ‘%tim%’
Box 4:WHERE ConfirmedReceiveBy IN (SELECT CustomerName FROM Sales.Customers)

11 Comments on “How should you complete the Transact-SQL statement?

    1. Tiago says:

      this query returns all records where the name is tim, not the records of the Invoices table where the name is tim -> ” You need to find the records in the Invoices table that contain the word Tim in the CustomerName field”




      1



      3
  1. 113 says:

    I am able now to understand the question and the options because i have found this question in another place and it is “You need to find the records in the Invoices table that contain the word Tim in the CustomerName field along with the incorrectly entered row from the Sales.Invoice table.”




    6



    0

Leave a Reply