Which five Transact-SQL segments should you use to develop the solution?

DRAG DROP

Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.

You are developing a database to track customer orders. The database contains the following tables: Sales.Customers, Sales.Orders, and Sales.OrderLines. The following table describes the columns in Sales.Customers.

The following table describes the columns in Sales.Orders.

The following table describes the columns in Sales.OrderLines.

You need to create a function that calculates the highest tax rate charged for an item in a specific order.

Which five Transact-SQL segments should you use to develop the solution? To answer, move the appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and arrange them in the correct order.

Answer:

Explanation:

Box1: CREATE FUNCTION…@OrderID

Include definition for the …@OrderID parameter.

Box 2: RETURNS decimal(18,2)

The function is defined to return a scalar value.

Box 3: AS BEGIN …

Declare the local variables of the function.

Box 4: SET @CalculatedTaxRate = (..

Calculate the tax rate.

Box 5: RETURN @CalculatedRate END

Return a scalar value.

References: https://msdn.microsoft.com/en-us/library/ms186755.aspx

Latest 70-761 Dumps Valid Version with 212 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments