[Free] 2019(Nov) EnsurePass Microsoft 70-761 Dumps with VCE and PDF 51-60

Get Full Version of the Exam
http://www.EnsurePass.com/70-761.html

Question No.51

DRAG DROP

You have two tables named UserLogin and Employee respectively.

You need to create a Transact-SQL script that meets the following requirements:

image

The script must update the value of the IsDeleted column for the UserLogin table to 1 if the value of the Id column for the UserLogin table is equal to 1.

image

The script must update the value of the IsDeleted column of the Employee table to 1 if the value of the Id column is equal to 1 for the Employee table when an update to the UserLogin table throws an error.

image

The error message quot;No tables updated!quot; must be produced when an update to the Employee table throws an error.

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.

image

Correct Answer:

image

Question No.52

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 have a table named AuditTrail that tracks modifications to data in other tables. The AuditTrail table is updated by many processes. Data input into AuditTrail may contain improperly formatted date time values. You implement a process that retrieves data from the various columns in AuditTrail, but sometimes the process throws an error when it is unable to convert the data into valid date time values.

You need to convert the data into a valid date time value using the en-US format culture code. If the conversion fails, a null value must be returned in the column output. The conversion process must not throw an error.

What should you implement?

  1. the COALESCE function

  2. a view

  3. a table-valued function

  4. the TRY_PARSE function

  5. a stored procedure

  6. the ISNULL function

  7. a scalar function

  8. the TRY_CONVERT function

Correct Answer: H

Explanation:

A TRY_CONVERT function returns a value cast to the specified data type if the cast succeeds; otherwise, returns null.

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

Question No.53

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:

image

You have the following stored procedure:

image

You need to modify the stored procedure to meet the following new requirements:

image

Insert product records as a single unit of work.

image

Return error number 51000 when a product fails to insert into the database.

image

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:

image

Does the solution meet the goal?

  1. Yes

  2. No

Correct Answer: A

Explanation:

If the INSERT INTO statement raises an error, the statement will be caught and an error 51000 will be thrown. In this case no records will have been inserted.

Note:

You can implement error handling for the INSERT statement by specifying the statement in a TRY…CATCH construct.

If an INSERT statement violates a constraint or rule, or if it has a value incompatible with the data type of the column, the statement fails and an error message is returned.

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

Question No.54

HOTSPOT

You need to develop a Transact-SQL statement that meets the following requirements:

image

image

The statement must return a custom error when there are problems updating a table. The error number must be value 50555.

image

The error severity level must be 14.

image

A Microsoft SQL Server alert must be triggered when the error condition occurs. Which Transact-SQL segment should you use for each requirement?

To answer, select the appropriate Transact-SQL segments in the answer area.

image

Correct Answer:

image

Question No.55

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.

image

The following table describes the columns in Sales.Orders.

image

The following table describes the columns in Sales.OrderLines.

image

You need to create a function that accepts a CustomerID as a parameter and returns the following information:

image

image

image

image

all customer information for the customer the total number of orders for the customer the total price of all orders for the customer the average quantity of items per order

How should you complete the function definition?

To answer, drag the appropriate Transact-SQL segment to the correct locations. 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.

image

Correct Answer:

image

Question No.56

You need to create an indexed view that requires logic statements to manipulate the data that the view displays. Which two database objects should you use? Each correct answer presents a complete solution.

  1. a user-defined table-valued function

  2. a CRL function

  3. a stored procedure

  4. a user-defined scalar function

Correct Answer: AC

Question No.57

DRAG DROP

You need to create a stored procedure that meets the following requirements:

image

image

Produces a warning if the credit limit parameter is greater than 7,000 Propagates all unexpected errors to the calling process

How should you complete the Transact-SQL statement?

To answer, drag the appropriate Transact-SQP segments to the correct locations. Each Transact- SQL segments 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.

image

Correct Answer:

image

Question No.58

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 on this series.

You have a database that tracks orders and deliveries for customers in North America. System versioning is enabled for all tables. The database contains the Sales.Customers, Application.Cities, and Sales.CustomerCategories tables.

Details for the Sales.Customers table are shown in the following table:

image

Details for the Application.Cities table are shown in the following table:

image

Details for the Sales.CustomerCategories table are shown in the following table:

image

You discover an application bug that impacts customer data for records created on or after January 1, 2014. In order to fix the data impacted by the bug, application programmers require a report that contains customer data as it existed on December 31, 2013.

You need to provide the query for the report. Which Transact-SQL statement should you use?

image

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Correct Answer: D

Explanation:

The datetime datetype defines a date that is combined with a time of day with fractional seconds that is based on a 24-hour clock.

The DATEFROMPARTS function returns a date value for the specified year, month, and day.

Question No.59

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 have a database that contains tables named Customer_CRMSystem and Customer_HRSystem. Both tables use the following structure:

The tables include the following records:

Customer_CRMSystem

image

Customer_HRSystem

image

Records that contain null values for CustomerCode can be uniquely identified by CustomerName. You need to create a list of all unique customers that appear in either table.

Which Transact-SQL statement should you run?

image

image

  1. Option A

  2. Option B

  3. Option C

  4. Option D

  5. Option E

  6. Option F

  7. Option G

  8. Option H

Correct Answer: E

Explanation:

UNION combines the results of two or more queries into a single result set that includes all the rows that belong to all queries in the union. The UNION operation is different from using joins that combine columns from two tables.

Question No.60

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.

Start of repeated scenario

You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

image

You review the Employee table and make the following observations:

image

image

Every record has a value in the ManagerID except for the Chief Executive Officer (CEO). The FirstName and MiddleName columns contain null values for some records.

image

The valid values for the Title column are Sales Representative manager, and CEO. You review the SalesSummary table and make the following observations:

image

The ProductCode column contains two parts: The first five digits represent a product code, and the last seven digits represent the unit price. The unit price uses the following pattern: ####.##.

image

You observe that for many records, the unit price portion of the ProductCode column contains values.

image

image

The RegionCode column contains NULL for some records. Sales data is only recorded for sales representatives.

You are developing a series of reports and procedures to support the business. Details for each report or procedure follow.

Sales Summary report: This report aggregates data by year and quarter. The report must resemble the following table.

image

Sales Manager report: This report lists each sales manager and the total sales amount for all employees that report to the sales manager.

Sales by Region report: This report lists the total sales amount by employee and by region. The report must include the following columns: EmployeeCode, MiddleName, LastName, RegionCode, and SalesAmount. If MiddleName is NULL, FirstName must be displayed. If both FirstName and MiddleName have null values, the world Unknown must be displayed/ If RegionCode is NULL, the word Unknown must be displayed.

>

Get Full Version of the Exam
70-761 Dumps
70-761 VCE and PDF

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.