QUESTION 183Note: 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 are creating indexes in a data warehouse.You have a dimension table named Table1 that has 10,000 rows. The rows are used to generate several reports.The reports join a column that is the primary key.The execution plan contains bookmark lookups for Table1.You discover that the reports run slower than expected.You need to reduce the amount of time it takes to run the reports.Solution: You create a nonclustered index on the primary key column that does NOT include columns.Does this meet the goal?

QUESTION 184Note: 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:You create a cursor by running the following Transact-SQL statement:If the credit limit is zero, you must delete the customer record while fetching data.You need to add the DELETE statement.Solution: You add the following Transact-SQL statement:Does the solution meet the goal?

QUESTION 185Note: 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:You create a cursor by running the following Transact-SQL statement:If the credit limit is zero, you must delete the customer record while fetching data.You need to add the DELETE statement.Solution: You add the following Transact-SQL statement:Does the solution meet the goal?

A. YesB. No

Answer: B

QUESTION 186You have a table named Table1 that contains 200 million rows. Table1 contains a column named SaleDate that has a data type of DateTime2(3).Users report that the following query runs slowly.You need to reduce the amount of time it takes to run the query.What should you use to replace the WHERE statement?

A. WHERE SaleDate >= ‘2017-01-01’ AND SaleDate < ‘2018-01-01’B. WHERE cast(SaleDate as varchar(10)) BETWEEN ‘2017-01-01’ AND ‘2017-12-31’C. WHERE cast(SaleDate as date) BETWEEN ‘2017-01-01’AND ‘2017-12-31’D. WHERE 2017 = year(SaleDate)

QUESTION 187You have a database that tracks customer complaints.The database contains a table named Complaints that includes the following columns:You need to create a query that lists complaints about defective products. The report must include complaints where the exact phrase “defective product” occurs, as well as complaints where similar phrases occur.Which Transact-SQL statement should you run?

QUESTION 188You run the following Transact-SQL statements:You need to create a query that returns the total number of attendees for each combination of CourseID, CourseDate, and the following locations: Lisbon, London, and Seattle. The result set should resemble the following:

QUESTION 189You have a project management application. The application uses a Microsoft SQL Server database to store data. You are developing a software bug tracking add-on for the application.The add-on must meet the following requirements:– Allow case sensitive searches for product.– Filter search results based on exact text in the description.– Support multibyte Unicode characters.You run the following Transact-SQL statement:Users connect to an instance of the bug tracking application that is hosted in New York City. Users in Seattle must be able to display the local date and time for any bugs that they create.You need to ensure that the DateCreated column displays correctly.Which Transact-SQL statement should you run?

QUESTION 190SIMULATIONYou have a database that includes the following tables. All of the tables are in the Production schema.You need to create a query that returns a list of product names for all products in the Beverages category.Construct the query using the following guidelines:– Use the first letter of the table name as the table alias.– Use two-part column names.– Do not surround object names with square brackets.– Do not use implicit joins.– Do not use variables.– Use single quotes to surround literal values.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.

QUESTION 191Note: 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 Person that contains information about employees. Users are requesting a way to access specific columns from the Person table without specifying the Person table in the query statement. The columns that users can access will be determined when the query is running against the data. There are some records that are restricted, and a trigger will evaluate whether the request is attempting to access a restricted record.You need to ensure that users can access the needed columns while minimizing storage on the database server.What should you implement?

A. the COALESCE functionB. a viewC. a table-valued functionD. the TRY_PARSE functionE. a stored procedureF. the ISNULL functionG. a scalar functionH. the TRY_CONVERT function