Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


CAST Specification


With the CAST specification it is possible to specify a data type conversion. CAST converts the value of an expression to a specified data type.



Rules

The following rules apply to CAST:


Exact num
Appr. num
Char/
nchar
Date
Time
Time-stamp
Year-Mon
Day-Time
Bool
Bin
Lob
Exact num
Y
Y
Y
N
N
N
Y*
Y*
N
N
N
Approx num
Y
Y
Y
N
N
N
N
N
N
N
N
Char/nchar
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
N
Date
N
N
Y
Y
N
Y
N
N
N
N
N
Time
N
N
Y
N
Y
Y
N
N
N
N
N
Timestamp
N
N
Y
Y
Y
Y
N
N
N
N
N
Year-Month
Y*
N
Y
N
N
N
Y
N
N
N
N
Day-Time
Y*
N
Y
N
N
N
N
Y
N
N
N
Boolean
N
N
Y
N
N
N
N
N
Y
N
N
Binary
N
N
N
N
N
N
N
N
N
Y
N
Lob
N
N
N
N
N
N
N
N
N
N
N

Example

 SELECT CAST(floatcol AS DECIMAL(15,3)),
        CAST(charcol AS VARCHAR(10)),
        CAST(intcol AS CHAR(15)),
        CAST(decimcol AS FLOAT)
 FROM types_tab;

Standard Compliance

This section summarizes standard compliance for expressions.

Standard
Compliance
Comments
SQL-2003
Core
Feature E071-06 "Table operations in subqueries" is not supported, otherwise Mimer SQL is fully compliant.
SQL-2003
Features outside core
Feature F251, "Domain support" use of domain as target specification in cast expressions.
Feature F052, "Intervals and Datetime arithmetic".
Feature F691, "Collation and translations" support for collate clause.
Feature T031, "Boolean datatype".


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX