Here you can find all the free questions related with Microsoft Developing AI-Enabled Database Solutions (DP-800) exam. You can also find on this page links to recently updated premium files with which you can practice for actual Microsoft Developing AI-Enabled Database Solutions Exam. These premium versions are provided as DP-800 exam practice tests, both as desktop software and browser based application, you can use whatever suits your style. Feel free to try the Developing AI-Enabled Database Solutions Exam premium files for free, Good luck with your Microsoft Developing AI-Enabled Database Solutions Exam.
Question No: 1
MultipleChoice
Vou have a SQL database in Microsoft Fabric that contains a nvarchar(max) column named MessageText. An ID is always contained within the first paragraph of MessageText.
You need to write a Transact SQL query that uses REGEXP_SUBSTR to extract the ID from MessageText.
What should you include in the query?
Options
Answer BExplanation
Microsoft documents REGEXP_SUBSTR for Transact-SQL with the string_expression parameter as supporting character string types char, nchar, varchar, and nvarchar. For the regex functions, support for LOB types such as varchar(max) and nvarchar(max) is specifically called out for REGEXP_LIKE, REGEXP_COUNT, and REGEXP_INSTR up to 2 MB, but that support note is not listed for REGEXP_SUBSTR in the surfaced documentation. In exam terms, the safe and expected approach is to cast the nvarchar(max) column to nvarchar(4000) before calling REGEXP_SUBSTR.
This also fits the scenario detail that the ID is always contained within the first paragraph of MessageText. Since the needed value is near the start of the text, narrowing the input to a non-LOB string type such as nvarchar(4000) is sufficient and avoids incompatibility concerns with nvarchar(max).
The other options are not appropriate:
A STRING_ESCAPE(..., 'json') is for JSON escaping, not regex extraction.
C adding a case-sensitive collation changes comparison behavior, but it is not the required fix for REGEXP_SUBSTR on nvarchar(max).
D TRY_CONVERT(varchar(max), ...) still leaves a MAX type and also risks unnecessary Unicode loss.