• Login

DataSoft Corporation

Conversion Functions

The conversion functions convert an expression to a data type. The CONVERT function can convert data only to an ODBC data type. Note that more than one Pervasive PSQL data type may be mapped to the same ODBC type. For example, DECIMAL, CURRENCY, and BIGINT are all mapped to the ODBC data type SQL_DECIMAL.

The CAST function converts an expression to a Pervasive PSQL relational data type (provided that the expression can be converted to the data type). The CAST function can convert binary zeros in a string. For example, CAST(c1 AS BINARY(10)), where c1 is a character column that contains binary zeros (NULLs).

You cannot CAST or CONVERT user-defined data types.

If both the input and the output are character strings, the output from CAST or CONVERT has the same collation as the input string.

CAST (exp AS type)

Converts exp to the type indicated

CONVERT (exp, type [, style ])

Converts exp to the type indicated.

   Knowledgebase  Contact Us
 Sitemap  Privacy Policy
    Customer Service

Copyright © 2020 DataSoft Corporation All rights reserved.