Dumps4cert.com : Latest Dumps with PDF and VCE Files
2018 Jan Microsoft Official New Released 70-761
100% Free Download! 100% Pass Guaranteed!
http://www.Dumps4cert.com/70-761.html

Querying Data with Transact-SQL (beta)

Question No: 1

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 named Customers. Data stored in the table must be exchanged between web pages and web servers by using AJAX calls that use REST endpoint.

You need to return all customer information by using a data exchange format that is text- based and lightweight.

Which Transact-SQL statement should you run?

Dumps4Cert 2018 PDF and VCE

Dumps4Cert 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

  5. Option E

  6. Option F

  7. Option G

  8. Option H

Answer: C Explanation:

JSON can be used to pass AJAX updates between the client and the server.

Export data from SQL Server as JSON, or format query results as JSON, by adding the FOR JSON clause to a SELECT statement.

When you use the FOR JSON clause, you can specify the structure of the output explicitly, or let the structure of the SELECT statement determine the output.

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

Question No: 2

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:

Dumps4Cert 2018 PDF and VCE

You must insert the following data into the Customer table:

Dumps4Cert 2018 PDF and VCE

Dumps4Cert 2018 PDF and VCE

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

Does the solution meet the goal?

  1. Yes

  2. No

Answer: B Explanation:

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

Question No: 3

You have a database named MyDb. You run the following Transact-SQL statements:

Dumps4Cert 2018 PDF and VCE

A value of 1 in the IsActive column indicates that a user is active.

You need to create a count for active users in each role. If a role has no active users. you must display a zero as the active users count.

Which Transact-SQL statement should you run?

Dumps4Cert 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: C

Question No: 4 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 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:

Dumps4Cert 2018 PDF and VCE

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

Dumps4Cert 2018 PDF and VCE

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

Dumps4Cert 2018 PDF and VCE

You are creating a report to show when the first customer account was opened in each city. The report contains a line chart with the following characteristics:

  • The chart contains a data point for each city, with lines connecting the points.

  • The X axis contains the position that the city occupies relative to other cities.

  • The Y axis contains the date that the first account in any city was opened. An example chart is shown below for five cities:

Dumps4Cert 2018 PDF and VCE

During a sales promotion, customers from various cities open new accounts on the same date.

You need to write a query that returns the data for the chart.

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.

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Explanation:

Dumps4Cert 2018 PDF and VCE

Box 1: RANK() OVER

RANK returns the rank of each row within the partition of a result set. The rank of a row is one plus the number of ranks that come before the row in question.

ROW_NUMBER and RANK are similar. ROW_NUMBER numbers all rows sequentially (for example 1, 2, 3, 4, 5).

Question No: 5 HOTSPOT

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.

Dumps4Cert 2018 PDF and VCE

The following table describes the columns in Sales.Orders.

Dumps4Cert 2018 PDF and VCE

The following table describes the columns in Sales.OrderLines.

Dumps4Cert 2018 PDF and VCE

You need to create a database object that calculates the total price of an order including the sales tax. The database object must meet the following requirements:

  • Reduce the compilation cost of Transact-SQL code by caching the plans and reusing them for repeated execution.

  • Return a value.

  • Be callable from a SELECT statement.

How should you complete the Transact-SQL statements? To answer, select the appropriate Transact-SQL segments in the answer area.

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Explanation:

Dumps4Cert 2018 PDF and VCE

Box 1: FUNCTION

To be able to return a value we should use a scalar function.

CREATE FUNCTION creates a user-defined function in SQL Server and Azure SQL Database. The return value can either be a scalar (single) value or a table.

Box 2: RETURNS decimal(18,2)

Use the same data format as used in the UnitPrice column.

Box 3: BEGIN

Transact-SQL Scalar Function Syntax include the BEGIN ..END construct.

CREATE [ OR ALTER ] FUNCTION [ schema_name. ] function_name

( [ { @parameter_name [ AS ][ type_schema_name. ] parameter_data_type [ = default ] [ READONLY ] }

[ ,…n ]

]

)

RETURNS return_data_type

[ WITH lt;function_optiongt; [ ,…n ] ] [ AS ]

BEGIN

function_body

RETURN scalar_expression END

[ ; ]

Box 4: @OrderPrice * @CalculatedTaxRate Calculate the price including tax.

Box 5: END

Transact-SQL Scalar Function Syntax include the BEGIN ..END construct. References: https://msdn.microsoft.com/en-us/library/ms186755.aspx

Question No: 6

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:

Dumps4Cert 2018 PDF and VCE

You need to return normalized data for all customers that were added in the year 2014. Which Transact-SQL statement should you run?

Dumps4Cert 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D.

  5. Option E.

  6. Option F.

  7. Option G.

  8. Option H.

Answer: G

Explanation:

The following query searches for row versions for Employee row with EmployeeID = 1000 that were active at least for a portion of period between 1st January of 2014 and 1st January 2015 (including the upper boundary):

SELECT * FROM Employee FOR SYSTEM_TIME

BETWEEN #39;2014-01-01 00:00:00.0000000#39; AND #39;2015-01-01 00:00:00.0000000#39;

WHERE EmployeeID = 1000 ORDER BY ValidFrom;

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

Question No: 7

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 stores sales and order information.

Users must be able to extract information from the tables on an ad hoc basis. They must also be able to reference the extracted information as a single table.

You need to implement a solution that allows users to retrieve the data required, based on variables defined at the time of the query.

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

Answer: C Explanation:

User-defined functions that return a table data type can be powerful alternatives to views. These functions are referred to as table-valued functions. A table-valued user-defined function can be used where table or view expressions are allowed in Transact-SQL queries. While views are limited to a single SELECT statement, user-defined functions can contain additional statements that allow more powerful logic than is possible in views.

A table-valued user-defined function can also replace stored procedures that return a single result set.

References: https://technet.microsoft.com/en-us/library/ms191165(v=sql.105).aspx

Question No: 8 CORRECT TEXT

You have a database that contains the following tables.

Dumps4Cert 2018 PDF and VCE

You need to create a query that lists all complaints from the Complaints table, and the name of the person handling the complaints if a person is assigned. The ComplaintID must be displayed first, followed by the person name.

Construct the query using the following guidelines:

  • Use two-part column names.

  • Use one-part table names.

  • Do not use aliases for column names or table names.

  • Do not use Transact-SQL functions.

  • Do not use implicit joins.

  • Do not surround object names with square brackets.

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.

Dumps4Cert 2018 PDF and VCE

Dumps4Cert 2018 PDF and VCE

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

Answer: Pending

Question No: 9 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.

Dumps4Cert 2018 PDF and VCE

The following table describes the columns in Sales.Orders.

Dumps4Cert 2018 PDF and VCE

The following table describes the columns in Sales.OrderLines.

Dumps4Cert 2018 PDF and VCE

You need to create a function that calculates the highest tax rate charged for an item in a specific order.

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.

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Explanation:

Dumps4Cert 2018 PDF and VCE

Box 1: CREATE FUNCTION…@OrderID

Include definition for the …@OrderID parameter.

Box 2: RETURNS decimal(18,2)

The function is defined to return a scalar value.

Box 3: AS BEGIN …

Declare the local variables of the function.

Box 4: SET @CalculatedTaxRate = (.. Calculate the tax rate.

Box 5: RETURN @CalculatedRate END Return a scalar value.

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

Question No: 10 DRAG DROP

You have a table named HR.Employees as shown in the exhibit. (Click the exhibit button.)

Dumps4Cert 2018 PDF and VCE

You need to write a query that will change the value of the job title column to Customer Representative for any employee who lives in Seattle and has a job title of Sales Representative. If the employee does not have a manager defined, you must not change the title.

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

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Explanation:

Dumps4Cert 2018 PDF and VCE

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

100% Dumps4cert Free Download!
Download Free Demo:70-761 Demo PDF
100% Dumps4cert Free Guaranteed!
Download 2018 Dumps4cert 70-761 Full Exam PDF and VCE

Dumps4cert 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