Question 51

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You create a table named Products by running the following Transact-SQL statement:

You have the following stored procedure:

You need to modify the stored procedure to meet the following new requirements:
* Insert product records as a single unit of work.
* Return error number 51000 when a product fails to insert into the database.
* If a product record insert operation fails, the product information must not be permanently written to the database.
Solution: You run the following Transact-SQL statement:

Does the solution meet the goal?
  • Question 52

    Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
    After you answer a question in this section. you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
    You create a table named Products by running the following Transact-SQL statement:

    You have the following stored procedure:

    You need to modify the stored procedure to meet the following new requirements:
    - Insert product records as a single unit of work.
    - Return error number 51000 when a product fails to insert into the database.
    - If a product record insert operation fails, the product information must not be permanently written to the database.
    Solution: You run the following Transact-SQL statement:

    Does the solution meet the goal?
  • Question 53

    You have the following subqueries: Subquery1, Subquery2, and Subquery3.
    You need to replace the three subqueries with named result sets or temporary tables. The following requirements must be met:

    Which replacement techniques should you use? To answer, select the appropriate options in the answer area.

    Question 54

    Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question.
    You create a table by running the following Transact-SQL statement:

    You need to develop a query that meets the following requirements:
    * Output data by using a tree-like structure.
    * Allow mixed content types.
    * Use custom metadata attributes.
    Which Transact-SQL statement should you run?

  • Question 55

    You create a table to track sales persons by running the following Transact-SQL statement:

    You need to create a report that shows the sales people within each territory for each year. The report must display sales people in order by highest sales amount.
    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.