A housing authority needs to flag near-duplicate applicant names against a master resident index so clerks can merge files before waitlist placement. Which T-SQL function should the developer use to measure how many character edits separate two names?
Select an answer to reveal the explanation.
Short Explanation
You can think of two names as slightly different spellings on twin mailbox labels: EDIT_DISTANCE counts the character tweaks that turn one into the other. That gives you a practical way to spot near-duplicate names before clerks merge files.
Full Explanation
EDIT_DISTANCE is the correct T-SQL function when a housing authority needs to quantify how many single-character insertions, deletions, or substitutions separate an applicant name from an entry in the master resident index. This Levenshtein count gives clerks an objective near-duplicate signal they can threshold before waitlist placement and file merging, matching the municipal deduplication task described. JSON_VALUE fails by concept because it extracts a scalar value from a JSON path; it does not compare two free-text names or return an edit count. DENSE_RANK assigns dense ordinal ranks within a window partition, which is useful for ranking results but does not measure spelling distance between strings. VECTOR_DISTANCE compares embedding vectors in a vector-search context, not raw character spellings, and would require a different data model from the master-index string match needed here. Exam caveat: DP-800 distinguishes character-based fuzzy string comparison from JSON extraction, window ranking, and vector search; the word “distance” alone does not mean character edits. Practical check: After deployment, sample known near-duplicates and true non-matches from the municipal applicant feed, confirm EDIT_DISTANCE ranks them as expected, tune the clerk merge threshold, and verify the procedure logs both names and the edit count for audit before any waitlist merge.