Question 146

HOTSPOT
You run the following Transact-SQL statement:

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.

Question 147

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

Customer_HRSystem

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?

  • Question 148

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

    You add the following data to the table.

    You need to create a query that uses a common table expression (CTE) to show the parent category of each category. The query must meet the following requirements:
    * Return all columns from the Categories table in the order shown.
    * Exclude all categories that do not have a parent category.
    Construct the query using the following guidelines:
    * Name the expression ParentCategories.
    * Use PC as the alias for the expression.
    * Use C as the alias for the Categories table.
    * Use the AS keyword for all table aliases.
    * Use individual column names for each column that the query returns.
    * Do not use a prefix for any column name.
    * 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.

    Use the Check Syntax button to verify your work. Any syntax or spelling errors will be reported by line and character position. You may check syntax as many times as needed.

    Question 149

    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 contains a single table named tblVehicleRegistration. The table is defined as follows:

    You run the following query:

    The query output window displays the following error message: "Conversion failed when converting the varchar value 'AB012' to data type int." You need to resolve the error.
    Solution: You modify the Transact-SQL statement as follows:

    Does the solution meet the goal?
  • Question 150

    You have a database that contains the following tables.

    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.


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