2017 March Microsoft Official New Released 70-761 Dumps in Lead2pass.com!
100% Free Download! 100% Pass Guaranteed!
70-761 easy pass guide: Preparing for Microsoft 70-761 exam is really a tough task to accomplish. However, Lead2pass delivers the most comprehensive braindumps, covering each and every aspect of 70-761 exam curriculum.
Following questions and answers are all new published by Microsoft Official Exam Center: http://www.lead2pass.com/70-761.html
QUESTION 16
Hotspot Question
You need to develop a Transact-SQL statement that meets the following requirements:
– The statement must return a custom error when there are problems updating a table.
– The error number must be value 50555.
– The error severity level must be 14.
– A Microsoft SQL Server alert must be triggered when the error condition occurs.
Which Transact-SQL segment should you use for each requirement? To answer, select the appropriate Transact-SQL segments in the answer area.
Answer:
Explanation:
Box 1: TRY…CATCH
The TRY…CATCH Transact-SQL construct implements error handling for Transact-SQL that is similar to the exception handling in the Microsoft Visual C# and Microsoft Visual C++ languages. A group of Transact-SQL statements can be enclosed in a TRY block. If an error occurs in the TRY block, control is passed to another group of statements that is enclosed in a CATCH block.
Box 2: RAISERROR(50555, 14, 1 ‘The update failed.”) WITH LOG We must use RAISERROR to be able to specify the required severity level of 14, and we should also use the LOG option, which Logs the error in the error log and the application log for the instance of the Microsoft SQL Server Database Engine, as this enable a MS MS SQL SERVER alert to be triggered.
Note: RAISERROR generates an error message and initiates error processing for the session. RAISERROR can either reference a user-defined message stored in the sys.messages catalog view or build a message dynamically. The message is returned as a server error message to the calling application or to an associated CATCH block of a TRY…CATCH construct.
QUESTION 17
Drag and Drop Question
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.)
The stored procedure must meet the following requirements:
– Accept two input parameters.
– Update the company name if the customer exists.
– 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.
Answer:
QUESTION 18
You need to create an indexed view that requires logic statements to manipulate the data that the view displays.
Which two database objects should you use? Each correct answer presents a complete solution.
A. a user-defined table-valued function
B. a CRL function
C. a stored procedure
D. a user-defined scalar function
Answer: AC
QUESTION 19
Drag and Drop Question
You have two tables named UserLogin and Employee respectively.
You need to create a Transact-SQL script that meets the following requirements:
– The script must update the value of the IsDeleted column for the UserLogin table to 1 if the value of the Id column for the User Login table is equal to 1.
– The script must update the value of the IsDeleted column of the Employee table to 1 if the value of the Id column is equal to 1 for the Employee table when an update to the User Login table throws an error.
– The error message “No tables updated!” must be produced when an update to the Employee table throws an error.
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 answerarea and arrange them in the correct order.
Answer:
Explanation:
A TRY block must be immediately followed by an associated CATCH block. Including any other statements between the END TRY and BEGIN CATCH statements generates a syntax error.
References: https://msdn.microsoft.com/en-us/library/ms175976.aspx
QUESTION 20
You work for an organization that monitors seismic activity around volcanos.
You have a table named GroundSensors. The table stored data collected from seismic sensors.
It includes the columns describes in the following table:
The database also contains a scalar value function named NearestMountain that returns the name of the mountain that is nearest to the sensor.
You need to create a query that shows the average of the normalized readings from the sensors for each mountain. The query must meet the following requirements:
– Include the average normalized readings and nearest mountain name.
– Exclude sensors for which no normalized reading exists.
– Exclude those sensors with value of zero for tremor.
Construct the query using the following guidelines:
– Use one part names to reference tables, columns and functions.
– Do not use parentheses unless required.
– Do not use aliases for column names and table names.
– 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.
Answer: GROUP BY
Explanation:
GROUP BY is a SELECT statement clause that divides the query result into groups of rows, usually for the purpose of performing one or more aggregations on each group. The SELECT statement returns one row per group.
References: https://msdn.microsoft.com/en-us/library/ms177673.aspx
QUESTION 21
Drag and Drop Question
You have a table named HR.Employees as shown in the exhibit. (Click the exhibit button.)
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.
Answer:
Explanation:
https://msdn.microsoft.com/en-us/library/ms177523.aspx
QUESTION 22
Hotspot Question
You have the following Transact-SQL query:
What type of functions are used in the query? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Box 1: Scalar
The return value of a function can either be a scalar (single) value or a table.
Box 2: Table-Valued
The APPLY operator allows you to invoke a table-valued function for each row returned by an outer table expression of a query. The table-valued function acts as the right input and the outer table expression acts as the left input. The right input is evaluated for each row from the left input and the rows produced are combined for the final output. The list of columns produced by the APPLY operator is the set of columns in the left input followed by the list of columns returned by the right input.
References:
https://msdn.microsoft.com/en-us/library/ms186755.aspx
https://technet.microsoft.com/en-us/library/ms175156(v=sql.105).aspx
QUESTION 23
Drag and Drop Question
You have a database that includes the following tables:
You need to create a list of all customer IDs and the date of the last order that each customer placed. If the customer has not placed any orders, you must return the date January 1, 1900.
The column names must be CustomerID and LastOrderDate.
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.
Answer:
Explanation:
Box 1: SELECT..COALESCE…
The COALESCE function evaluates the arguments in order and returns the current value of the first expression that initially does not evaluate to NULL.
Box 2: ..LEFT OUTER JOIN..
The LEFT JOIN (LEFT OUTER JOIN) keyword returns all rows from the left table (table1), with the matching rows in the right table (table2). The result is NULL in the right side when there is no match. A customer might have no orders so the right table must be allowed have a NULL value.
Box 3: ON c.custid = o.custid
We JOIN on the custID column, which is available in both tables.
Box 4: GROUP BY c.custid
References:
https://technet.microsoft.com/en-us/library/ms189499(v=sql.110).aspx
http://www.w3schools.com/sql/sql_join_left.asp
QUESTION 24
Hotspot Question
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.
Answer:
Explanation:
Box 1: custid
IDENTITY indicates that the new column is an identity column. When a new row is added to the table, the Database Engine provides a unique, incremental value for the column. Identity columns are typically used with PRIMARY KEY constraints to serve as the unique row identifier for the table.
Box 2: postalcode
postalcode is declared as NOT NULL, which means that a value must be inserted.
Box 3: region
Fax is also a correct answer. Both these two columns are declared as NULL, which means that data entry is optional.
References: https://msdn.microsoft.com/en-us/library/ms174979.aspx
QUESTION 25
You create a table named Sales.Orders by running the following Transact-SQL statement:
You need to write a query that meets the following requirements:
– removes orders from the table that were placed before January 1, 2012
– uses the date format of YYYYMMDD
– ensures that the order has been shipped before deleting the record
Construct the query using the following guidelines:
– use one-part column names and two-part table names
– do not use functions
– do not surround object names with square brackets
– do not use variables
– do not use aliases for column names and table names
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.
Answer: Pending
QUESTION 26
You have a database that contains the following tables.
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:
– Return a column named Fullname that includes the salesperson FirstName, a space, and then LastName.
– Include the current year-to-date sales for each salesperson.
– Display only data for the three salespersons with the lowest year-to-year sales values.
– Exclude salespersons that have no value for TerritoryID.
Construct the query using the following guidelines:
– Use the first letter of a table name as the table alias.
– Use two-part column names.
– Do not surround object names with square brackets.
– Do not use implicit joins.
– Use only single quotes for literal text.
– Use aliases only if required.
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.
Answer: Pending
QUESTION 27
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.
Answer: Pending
QUESTION 28
You have a database that includes the tables shown in the exhibit. (Click the exhibit button.)
You need to create a list of all customers, the order ID for the last order that the customer placed, and the date that the order was placed. For customers who have not placed orders, you must substitute a zero for the order ID and O 1/01/1990 for the date.
Which Transact-SQL statement should you run?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Explanation:
ISNULL Syntax: ISNULL ( check_expression , replacement_value ) author:”Luxemburg, Rosa”
The ISNULL function replaces NULL with the specified replacement value. The value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned after it is implicitly converted to the type of check_expression.
References: https://msdn.microsoft.com/en-us/library/ms184325.aspx
QUESTION 29
You have a database that contains the following tables:
Customer
Customer Audit
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?
A. Option A
B. Option B
C. Option C
D. Option D
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.
QUESTION 30
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.
Drag and Drop Question
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:
Details for the Application.Cities table are shown in the following table:
Details for the Sales.CustomerCategories table are shown in the following table:
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:
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.
Answer:
Explanation:
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).
Lead2pass provides guarantee of Microsoft 70-761 exam because Lead2pass is an authenticated IT certifications site. The 70-761 dump is updated with regular basis and the answers are rechecked of every exam. Good luck in your exam.
70-761 new questions on Google Drive: https://drive.google.com/open?id=0B3Syig5i8gpDX0NzUC12eEl3VGc
2017 Microsoft 70-761 exam dumps (All 74 Q&As) from Lead2pass:
http://www.lead2pass.com/70-761.html [100% Exam Pass Guaranteed]