Data Conversion Functions

<< Click to Display Table of Contents >>

Navigation:  SQL Reference > Functions and Operators >

Data Conversion Functions

Previous pageReturn to chapter overviewNext page

 

Absolute Database provides the following functions to convert data from one data type to another:

Function

Description

CAST

A general SQL function that converts a given expression to a specified data type.

MIMETOBIN

Converts MIME-encoded value to a binary data type.

TODATE

Converts string to date and time. See Date Functions topic for details.

TOSTRING

Converts date and time to string. See Date Functions topic for details.

 

CAST (value_expr [ , | AS ] data_type)

Converts a given value_expr expression to a specified data_type.

Examples:

CAST(ytd_sales/price AS int)

CAST(memo_field AS Char(255))

 

MIMETOBIN (mime_expr)

Converts a given mime-encoded data from mime_expr to a binary data type. See also 'Export SQL' tab in DBManager utility supplied with the Absolute DB to get an example of MIME encoded binary data in a SQL command.

Example:

MIMETOBIN('<mime-encoded data>')

__________________________
Absolute SQL Reference - 05 January 2023, Niels Knabe