[Free] 2017(June) Ensurepass Examcollection Microsoft 70-761 Actual Tests 31-40

Ensurepass
2017 June Microsoft Official New Released 70-761 Q&As
100% Free Download! 100% Pass Guaranteed!
http://www.ensurepass.com/70-761.html

Querying Data with Transact-SQL

QUESTION 31

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 is denormalized. Users make frequent changes to data in a primary table.

 

You need to ensure that users cannot change the tables directly, and that changes made to the primary table also update any related tables.

 

What should you implement?

 

A.

the COALESCE function

B.

a view

C.

a table-valued function

D.

the TRY_PARSE function

E.

a stored procedure

F.

the ISNULL function

G.

a scalar function

H.

the TRY_CONVERT function

 

Correct Answer: B

Explanation:

Using an Indexed View would allow you to keep your base data in properly normalized tables and maintain data-integrity while giving you the denormalized “view” of that data.

 

References: http://stackoverflow.com/questions/4789091/updating-redundant-denormalized-data-automatically-in-sql-server

 

 

QUESTION 32

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 Customer by running the following Transact-SQL statement:

 

clip_image001

 

You must insert the following data into the Customer table:

 

clip_image003

 

You need to ensure that both records are inserted or neither record is inserted.

 

Solution: You run the following Transact-SQL statement:

 

clip_image005

 

Does
the solution meet the goal?

 

A.

Yes

B.

No

 

Correct Answer: A

Explanation:

With the INSERT INTO..VALUES statement we can insert both values with just one statement. This ensures that both records or neither is inserted.

 

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

 

 

QUESTION 33

HOTSPOT

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:

 

clip_image007

 

Which replacement techniques should you use?

 

To answer, select the appropriate options in the answer area.

 

clip_image009

 

Correct Answer:

clip_image011

 

QUESTION 34

DRAG DROP

You have a database that stored information about servers and application errors. The database contains the following tables.

 

Servers

clip_image013

 

Errors

clip_image015

 

You are building a webpage that shows the three most common errors for each server.

 

You need to return the data for the webpage.

 

How should you complete the Transact-SQL statement?

 

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

 

clip_image016

 

Correct Answer:

clip_image017

 

 

QUESTION 35

DRAG DROP

You create three tables by running the following Transact-SQL statements:

 

clip_image018

 

For reporting purposes, you need to find the active user count for each role, and the total active user count. The result must be ordered by active user count of each role. You must use common table expressions (CTEs).

 

Which four 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.

 

clip_image020

 

Correct Answer:

clip_image022

 

 

QUESTION 36

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 have a database that tracks orders and deliveries for customers in North America. The database contains the following tables:

 

Sales.Customers

clip_image024

 

Application.Cities

clip_image025

 

Sales.CustomerCategories

clip_image026

 

The company’s development team is designing a customer directory application. The application must list customers by the area code of their phone number. The area code is defined as the first three characters of the phone number.

 

The main page of the application will be based on an indexed view that contains the area and phone number for all customers.

 

You need to return the area code from the PhoneNumber field.

 

Solution: You run the following Transact-SQL statement:

 

clip_image027

 

Does the solution meet the goal?

A.

Yes

B.

No

 

Correct Answer: A

Explanation:

As the result of the function will be used in an indexed view we should use schemabinding.

 

References: https://sqlstudies.com/2014/08/06/schemabinding-what-why/

 

 

QUESTION 37

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 indep
endent 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:

 

clip_image028

 

The tables include the following records:

 

Customer_CRMSystem

clip_image029

 

Customer_HRSystem

clip_image030

 

Records that contain null values for CustomerCode can be uniquely identified by CustomerName.

 

You need to display a list of customers that do not appear in the Customer_HRSystem table.

 

Which Transact-SQL statement should you run?

 

clip_image031

clip_image032

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

F.

Option F

G.

Option G

H.

Option H

 

Correct Answer: D

Explanation:

EXCEPT returns distinct rows from the left input query that aren’t output by the right input query.

 

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

 

 

QUESTION 38

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 query a database that includes two tables: Project and Task. The Project table includes the following columns:

 

clip_image034

clip_image036

 

When running an operation, you updated a column named EndTime for several records in the Project table, but updates to the corresponding task records in the Task table failed.

 

You need to synchronize the value of the EndTime column in the Task table with the value of the EndTime column in the project table. The solution must meet the following requirements:

 

clip_image038If the EndTime column has a value, make no changes to the record.

clip_image038[1]If the value of the EndTime column is null and the corresponding project record is marked as completed, update the record with the project finish time.

 

Which four 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.

 

clip_image040

 

Correct Answer:

clip_image042

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 39

CORRECT TEXT

You have a database that contains the following tables.

 

clip_image044

 

You need to create a query that lists the lowest-performing salespersons based on the current year-to-date sales period. The query must meet the following requirements:

 

clip_image038[2]Return a column named Fullname that includes the salesperson FirstName, a space, and then LastName.

clip_image038[3]Include the current year-to-date sales for each salesperson.

clip_image038[4]Display only data for the three salespersons with the lowest year-to-year sales values.

clip_image038[5]Exclude salespersons that have no value for TerritoryID.

 

Construct the query using the following guidelines:

 

clip_image038[6]Use the first letter of a table name as the table alias.

clip_image038[7]Use two-part column names.

clip_image038[8]Do not surround object names with square brackets.

clip_image038[9]Do not use implicit joins.

clip_image038[10]Use only single quotes for literal text.

clip_image038[11]Use aliases only if required.

 

clip_image046

Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been provided as well as below it.

 

clip_image047

 

Use the Check Syntax button to verify your work. Any syntax or spelling errors will be reported by line and character position.

 

Correct Answer: Pending

 

 

QUESTION 40

You have a database that contains the following tables:

 

Customer

clip_image049

 

CustomerAudit

clip_image051

 

Where the value of the CustomerID column equals 3, you need to update the value of the CreditLimit column to 1000 for the customer. You must ensure that the change to the record in the Customer table is recorded on the CustomerAudit table.

 

Which Transact-SQL statement should you run?

 

clip_image052

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

Explanation:

The OUTPUT Clause returns information from, or expressions based on, each row affected by an INSERT, UPDATE, DELETE, or MERGE statement. These results can be returned to the processing application for use in such things as confirmation messages, archiving, and other such application requirements. The results can also be inserted into a table or table variable. Additionally, you can capture the results of an OUTPUT clause in a nested INSERT, UPDATE, DELETE, or MERGE statement, and insert those results into a target table or view.

 

Note: If the column modified by the .RITE clause is referenced in an OUTPUT clause, the complete value of the column, either the before image in deleted.column_name or the after image in inserted.column_name, is returned to the specified column in the table variable.

100% Free Download!
—Download Free Demo:70-761 Demo PDF
100% Pass Guaranteed!
Download 2017 Ensurepass 70-761 Full Exam PDF and VCE Q&As:59
—Get 10% off your purchase! Copy it:TJDN-947R-9CCD [2017.06.01-2017.06.30]

Ensurepass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF + VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

2017 Ensurepass IT Certification PDF and VCE