Microsoft
70-451 · Question #118
You are a database developer. You plan to design a database solution by using SQL Server 2008. Your company operates a fulfillment warehouse. The company has the following business requirements…
The correct answer is B. Create a multistatement table-valued function that accepts a table-valued parameter. See the full explanation below for the reasoning.
Question
You are a database developer. You plan to design a database solution by using SQL Server 2008. Your company operates a fulfillment warehouse. The company has the following business requirements:
- The packing of items to fulfill orders is processed as quickly as
possible.
- When the product picker indicates that a box is full, the exact items
list of the content and invoice are made available. You plan to design a Transact-SQL user-defined function. The function must perform the following tasks:
- Accept a list of value pairs named ProductID and Quantity as input.
- Retrieve the product price information from the ProductPrice table.
- Calculate the total price for each product.
- Calculate the total price for all products.
- Return the detailed and aggregated totals.
You need to design the function to meet these requirements. You want to achieve this goal by using the minimum amount of coding effort. What should you do?
Options
- ACreate a multistatement table-valued function that accepts an XML parameter.
- BCreate a multistatement table-valued function that accepts a table-valued parameter.
- CCreate an inline table-valued function that accepts an XML parameter.
- DCreate an inline table-valued function that accepts a table-valued parameter.
How the community answered
(40 responses)- A13% (5)
- B80% (32)
- C3% (1)
- D5% (2)
Community Discussion
No community discussion yet for this question.