Skip to content

Latest commit

 

History

History
43 lines (23 loc) · 730 Bytes

-search-sql-castingdatacolumntype.md

File metadata and controls

43 lines (23 loc) · 730 Bytes
description ms.assetid title ms.topic ms.date
Learn more about: Casting the Data Type of a Column
78a137a9-ef69-4ce3-8a96-73e722951300
Casting the Data Type of a Column
article
05/31/2018

Casting the Data Type of a Column

At times you may need to cast string data extracted from documents as another data type, so that an appropriate comparison can be made. Cast an identifier or literal as another data type using the following syntax:

CAST (<identifier> | <literal> AS <datatype>)

For example:

CAST ('10000' AS DBTYPE_I4)
            
CAST (System.DateCreated AS DBTYPE_WSTR)

Related topics

Data Type Mappings