4D v14

CAST

Home

 
4D v14
CAST

CAST  


 

 

Command CAST

CAST (arithmetic_expression AS sql_data_type_name)

The CAST function converts the arithmetic_expression to the sql_data_type_name passed following the AS keyword.

Example  

This example converts the year of the movie into an Integer type:

SELECT Year_of_Movie, Title, Director, Media, Sold_Tickets
FROM MOVIES
WHERE Year_of_Movie >= CAST('1960' AS INT)

 
PROPERTIES 

Product: 4D
Theme: Functions

 
ARTICLE USAGE

4D SQL Reference ( 4D v11 SQL Release 4 )
4D SQL Reference ( 4D v14)
4D SQL Reference ( 4D v12.1)
4D SQL Reference ( 4D v13.4)
4D SQL Reference ( 4D v14 R2)
4D SQL Reference ( 4D v14 R3)
4D SQL Reference ( 4D v14 R4)