Neoview ODBC Drivers Manual (R2.2 SP1)

Table Of Contents
CONVERT Function
The HP Neoview ODBC driver uses the SQL CAST function to support the ODBC CONVERT
function. The ODBC CONVERT function has the following format:
{ fn CONVERT( value_exp, data_type ) }
The SQL CAST has this format:
CAST( {value_exp | NULL } AS data_type )
SQL translates the CONVERT syntax to the CAST syntax, converting the data type argument to
its equivalent SQL value. For example, if the ODBC data type parameter for character data is an
integer value (SQL_CHAR or 1), the equivalent SQL data type is a string literal with a value of
CHARACTER.
ODBC Data Types
For information on SQL data types that are supported by HP ODBC, refer to the HP Neoview
SQL Reference Manual.
Table 5-15 ODBC Data Types
Supported by HP ODBCSQL Data TypeODBC Data Type
Yes
CHAR(n)CHAR(n)
Yes
VARCHAR(n) *VARCHAR(n)
Yes
VARCHAR(n)
LONGVARCHAR
Yes
DECIMAL(p,s)DECIMAL(p,s)
Yes
NUMERIC(p,s)NUMERIC(p,s)
YesSMALLINTSMALLINT
YesINTEGERINTEGER
YesREALREAL
Yes
FLOAT(p)FLOAT(p)
YesDOUBLE PRECISIONDOUBLE PRECISION
NoNot supportedBIT
NoNot supportedTINYINT
NoNot supportedTINYINT UNSIGNED
YesLARGEINTBIGINT
NoNot supportedBINARY(n)
NoNot supported
VARBINARY(n)
NoNot supportedLONG VARBINARY
YesDATEDATE
YesTIME
TIME(p)
YesTIMESTAMPTIMESTAMP
Yes
INTERVAL MONTH(p)INTERVAL MONTH(p)
Yes
INTERVAL YEAR(p)INTERVAL YEAR(p)
Yes
INTERVAL YEAR(p) TO MONTHINTERVAL YEAR(p) TO MONTH
Yes
INTERVAL DAY(p)INTERVAL DAY(p)
SQL Conformance Level 59