DP-600 · 2.2.8 · Prepare data
Convert data types
Convert column data types
Convert columns early with CAST, , CONVERT, or Power Query so joins, sorting, and downstream models use reliable types.
The core idea

Correct data types early in the pipeline. They affect joins, sorting, arithmetic, modeling, and report behavior.
Use CAST when invalid values should fail the statement. returns instead, which lets good rows continue while bad values remain visible for inspection.
CONVERT adds style options. In Power Query, Change type using locale handles region-specific text dates and numbers.
Key points
- CAST: conversion failure raises an error
- : conversion failure returns
- CONVERT: adds style options such as date formats
- Power Query: Change type can use a locale
Click an underlined term for a one-line explanation, or see them all in the glossary .
Exam trap
Joining a number and text with + converts the text to a number, not the number to text, because int outranks varchar. Cast the number to varchar yourself.
Sources · 4 Microsoft Learn pages Show ▾
- Data type conversion (Database Engine)
- TRY_CAST (Transact-SQL)
- Data types in Fabric Data Warehouse (Microsoft Fabric)
- Data types in Power Query
Checked on October 4, 2026. Report a problem
Go deeper on Microsoft Learn
- Data type conversion (Database Engine)
- TRY_CAST (Transact-SQL)
- Data types in Fabric Data Warehouse (Microsoft Fabric)
- Data types in Power Query
Checked against Microsoft Learn on October 4, 2026. Report a problem with this card