What should you implement?

Posted by: Pdfprep Category: 70-761 Tags: , ,

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 table named AuditTrail that tracks modifications to data in other tables. The AuditTrail table is updated by many processes. Data input into AuditTrail may contain improperly formatted date time values. You implement a process that retrieves data from the various columns in AuditTrail, but sometimes the process throws an error when it is unable to convert the data into valid date time values. You need to convert the data into a valid date time value using the en-US format culture code. If the conversion fails, a null value must be returned in the column output. The conversion process must not throw an error.

What should you implement?
A . the COALESCE function
B . a view
C . a table-valued function
D . the TRY_PARSE function
E . a stored procedure
F . the ISNULL function
G . a scalar function
H . the TRY_CONVERT function

Answer: H

Explanation:

A TRY_CONVERT function returns a value cast to the specified data type if the cast succeeds; otherwise, returns null.

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

Leave a Reply

Your email address will not be published.