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

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

Question No.11

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:

image

You are developing a report that aggregates customer data only for the year 2014. The report requires that the data be denormalized.

You need to return the data for the report. Which Transact-SQL statement should you run?

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: G

Question No.12

CORRECT TEXT

You have a table named Cities that has the following two columns: CityID and CityName. The CityID column uses the int data type, and CityName uses nvarchar(max).

You have a table named RawSurvey. Each row includes an identifier for a question and the number of persons that responded to that question from each of four cities. The table contains the following representative data:

image

A reporting table named SurveyReport has the following columns: CityID, QuestionID, and RawCount, where RawCount is the value from the RawSurvey table.

You need to write a Transact-SQL query to meet the following requirements:

image

image

Retrieve data from the RawSurvey table in the format of the SurveyReport table. The CityID must contain the CityID of the city that was surveyed.

image

image

The order of cities in all SELECT queries must match the order in the RawSurvey table. The order of cities in all IN statements must match the order in the RawSurvey table.

Construct the query using the following guidelines:

image

image

Use one-part names to reference tables and columns, except where not possible. ALL SELECT statements must specify columns.

image

image

Do not use column or table aliases, except those provided. Do not surround object names with square brackets.

image

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.

image

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

Correct Answer: UNPIVOT

Explanation:

UNPIVOT must be used to rotate columns of the Rawsurvey table into column values. References: https://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx

Question No.13

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:

image

You plan to run the following query to update tasks that are not yet started:

image

You need to return the total count of tasks that are impacted by this UPDATE operation, but are not associated with a project.

What set of Transact-SQL statements should you run?

image

Correct Answer: B

Explanation:

The WHERE clause of the third line should be WHERE ProjectID IS NULL, as we want to count the tasks that are not associated with a project.

Question No.14

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

image

Application.Cities

image

Sales.CustomerCategories

image

The company#39;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:

image

Does the solution meet the goal?

  1. Yes

  2. No

Correct Answer: B

Explanation:

The variable max, in the line DECLARE @areaCode nvarchar(max), is not defined.

Question No.15

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 need to create a query that meets the following requirements:

image

For customers that are not on a credit hold, return the CustomerID and the latest recorded population for the delivery city that is associated with the customer.

image

For customers that are on a credit hold, return the CustomerID and the latest recorded population for the postal city that is associated with the customer.

Which two Transact-SQL queries will achieve the goal? Each correct answer presents a complete solution.

image

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Correct Answer: AB

Explanation:

Using Cross Joins

A cross join that does not have a WHERE clause produces the Cartesian product of the tables involved in the join. The size of a Cartesian product result set is the number of rows in the first table multiplied by the number of rows in the second table. However, if a WHERE clause is added, the cross join behaves as an inner join.

B: You can use the IIF in the ON-statement.

IIF returns one of two values, depending on whether the Boolean expression evaluates to true or false in SQL Server.

References:

https://technet.microsoft.com/en-us/library/ms190690(v=sql.105).aspx https://msdn.microsoft.com/en-us/library/hh213574.aspx

Question No.16

DRAG DROP

You need to create a stored procedure to update a table named Sales.Customers. The structure of the table is shown in the exhibit. (Click the exhibit button.)

image

The stored procedure must meet the following requirements:

image

Accept two input parameters.

image

Update the company name if the customer exists.

image

Return a custom error message if the customer does not exist.

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.

NOTE: More than one order of answer choices is correct. You will receive credit for any of the correct orders you select.

image

Correct Answer:

image

Question No.17

CORRECT TEXT

You create a table named Sales.Orders by running the following Transact-SQL statement:

image

You need to write a query that meets the following requirements:

image

image

removes orders from the table that were placed before January 1, 2012 uses the date format of YYYYMMDD

image

ensures that the order has been shipped before deleting the record Construct the query using the following guidelines:

image

image

use one-part column names and two-part table names do not use functions

image

image

do not surround object names with square brackets do not use variables

image

do not use aliases for column names and table names

image

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.

image

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

Correct Answer: DELETE Sales.Orders FROM Sales.Orders

WHERE OrderDate amp;lt; amp;#39;20120101amp;#39; AND ShippedDate IS NOT NULL

Question No.18

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:

image

You must insert the following data into the Customer table:

image

You need to ensure that both records are inserted or neither record is inserted. Solution: You run the following Transact-SQL statement:

image

Does the solution meet the goal?

  1. Yes

  2. No

Correct Answer: B

Explanation:

As there are two separate INSERT INTO statements we cannot ensure that both or neither records is inserted.

Question No.19

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:

image

You need to audit all customer data.

Which Transact-SQL statement should you run?

image

  1. Option A

  2. Option B

  3. Option C

  4. Option D

  5. Option E

  6. Option F

  7. Option G

  8. Option G

Correct Answer: B

Explanation:

The FOR SYSTEM_TIME ALL clause returns all the row versions from both the Temporal and History table.

Note: A system-versioned temporal table defined through is a new type of user table in SQL Server 2016, here defined on the last line WITH (SYSTEM_VERSIONING = ON…, is designed to keep a full history of data changes and allow easy point in time analysis.

To query temporal data, the SELECT statement FROMlt;tablegt; clause has a new clause FOR SYSTEM_TIME with five temporal-specific sub-clauses to query data across the current and history tables.

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

Question No.20

HOTSPOT

You run the following Transact-SQL statement:

image

You need to ensure that you can insert data into the table. What are the characteristics of the data?

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

image

Correct Answer:

image

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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>