create table bit_table ( dummy int , col_0 int, col_1 char(10), col_2 varchar(80), col_3 long varchar, col_4 char(10) for bit data, col_5 long varchar for bit data, col_6 blob(80), typecol char (8 ) for bit data ) insert into bit_table values ( 45 ,100,'101','102','103',X'003100300034',X'003100300035',CAST (X'003100300036' AS blob(80)),CAST (X'003100300037' AS char (8 ) for bit data) ) insert into bit_table ( col_0 ) values ( 'true' ) ERROR 42821: Columns of type 'INTEGER' cannot hold values of type 'CHAR'. insert into bit_table ( col_1 ) values ( 'true' ) insert into bit_table ( col_2 ) values ( 'true' ) insert into bit_table ( col_3 ) values ( 'true' ) insert into bit_table ( col_4 ) values cast ( X'0074007200750065' AS char(10) for bit data) insert into bit_table ( col_5 ) values cast ( X'0074007200750065' AS long varchar for bit data) insert into bit_table ( col_6 ) values cast ( X'0074007200750065' AS blob(80)) insert into bit_table ( typecol ) values cast ( X'0074007200750065' AS char (8 ) for bit data) === Columntype int select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from bit_table 0 getObject ->'100' : java.lang.Integer 0 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 0 getAsciiStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBigDecimal ->'100' : java.math.BigDecimal 0 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Blob'.) 0 getBoolean ->'true' : java.lang.Boolean 0 getByte ->'100' : java.lang.Byte 0 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'byte[]'.) 0 getCharacterStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.Reader'.) 0 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Clob'.) 0 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Date'.) 0 getDouble ->'100.0' : java.lang.Double 0 getFloat ->'100.0' : java.lang.Float 0 getInt ->'100' : java.lang.Integer 0 getLong ->'100' : java.lang.Long 0 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 0 getShort ->'100' : java.lang.Short 0 getString ->'100' : java.lang.String 0 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Time'.) 0 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Timestamp'.) === Columntype char(10) select col_1 as col_1_1, col_1 as col_1_2, col_1 as col_1_3, col_1 as col_1_4, col_1 as col_1_5, col_1 as col_1_6, col_1 as col_1_7, col_1 as col_1_8, col_1 as col_1_9, col_1 as col_1_10, col_1 as col_1_11, col_1 as col_1_12, col_1 as col_1_13, col_1 as col_1_14, col_1 as col_1_15, col_1 as col_1_16, col_1 as col_1_17, col_1 as col_1_18, col_1 as col_1_19, col_1 as col_1_20, col_1 as col_1_21 from bit_table 1 getObject ->'101 ' : java.lang.String 1 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 1 getAsciiStream ->Object' : java.io.InputStream 1 getBigDecimal ->'101' : java.math.BigDecimal 1 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 1 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 1 getBoolean ->'true' : java.lang.Boolean 1 getByte ->'101' : java.lang.Byte 1 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 1 getCharacterStream ->Object' : java.io.Reader 1 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 1 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getDouble ->'101.0' : java.lang.Double 1 getFloat ->'101.0' : java.lang.Float 1 getInt ->'101' : java.lang.Integer 1 getLong ->'101' : java.lang.Long 1 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 1 getShort ->'101' : java.lang.Short 1 getString ->'101 ' : java.lang.String 1 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype varchar(80) select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from bit_table 2 getObject ->'102' : java.lang.String 2 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 2 getAsciiStream ->Object' : java.io.InputStream 2 getBigDecimal ->'102' : java.math.BigDecimal 2 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 2 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 2 getBoolean ->'true' : java.lang.Boolean 2 getByte ->'102' : java.lang.Byte 2 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 2 getCharacterStream ->Object' : java.io.Reader 2 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 2 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getDouble ->'102.0' : java.lang.Double 2 getFloat ->'102.0' : java.lang.Float 2 getInt ->'102' : java.lang.Integer 2 getLong ->'102' : java.lang.Long 2 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 2 getShort ->'102' : java.lang.Short 2 getString ->'102' : java.lang.String 2 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype long varchar select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from bit_table 3 getObject ->'103' : java.lang.String 3 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 3 getAsciiStream ->Object' : java.io.InputStream 3 getBigDecimal ->'103' : java.math.BigDecimal 3 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.io.InputStream'.) 3 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Blob'.) 3 getBoolean ->'true' : java.lang.Boolean 3 getByte ->'103' : java.lang.Byte 3 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'byte[]'.) 3 getCharacterStream ->Object' : java.io.Reader 3 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Clob'.) 3 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getDouble ->'103.0' : java.lang.Double 3 getFloat ->'103.0' : java.lang.Float 3 getInt ->'103' : java.lang.Integer 3 getLong ->'103' : java.lang.Long 3 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 3 getShort ->'103' : java.lang.Short 3 getString ->'103' : java.lang.String 3 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype char(10) for bit data select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from bit_table 4 getObject ->Object' : byte[] 4 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 4 getAsciiStream ->Object' : java.io.InputStream 4 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.math.BigDecimal'.) 4 getBinaryStream ->Object' : java.io.InputStream 4 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Blob'.) 4 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'boolean'.) 4 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'byte'.) 4 getBytes ->Object' : byte[] 4 getCharacterStream ->Object' : java.io.Reader 4 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Clob'.) 4 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Date'.) 4 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'double'.) 4 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'float'.) 4 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'int'.) 4 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'long'.) 4 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 4 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'short'.) 4 getString ->'00310030003420202020' : java.lang.String 4 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Time'.) 4 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Timestamp'.) === Columntype long varchar for bit data select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from bit_table 5 getObject ->Object' : byte[] 5 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 5 getAsciiStream ->Object' : java.io.InputStream 5 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.math.BigDecimal'.) 5 getBinaryStream ->Object' : java.io.InputStream 5 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Blob'.) 5 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'boolean'.) 5 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'byte'.) 5 getBytes ->Object' : byte[] 5 getCharacterStream ->Object' : java.io.Reader 5 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Clob'.) 5 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Date'.) 5 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'double'.) 5 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'float'.) 5 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'int'.) 5 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'long'.) 5 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 5 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'short'.) 5 getString ->'003100300035' : java.lang.String 5 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Time'.) 5 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Timestamp'.) === Columntype blob(80) select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from bit_table 6 getObject ->Object' : java.sql.Blob 6 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 6 getAsciiStream ->Object' : java.io.InputStream 6 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.math.BigDecimal'.) 6 getBinaryStream ->Object' : java.io.InputStream 6 getBlob ->Object' : java.sql.Blob 6 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'boolean'.) 6 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'byte'.) 6 getBytes ->Object' : byte[] 6 getCharacterStream ->Object' : java.io.Reader 6 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Clob'.) 6 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Date'.) 6 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'double'.) 6 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'float'.) 6 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'int'.) 6 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'long'.) 6 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 6 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'short'.) 6 getString ->'003100300036' : java.lang.String 6 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Time'.) 6 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Timestamp'.) === Columntype char (8 ) for bit data select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from bit_table 7 getObject ->Object' : byte[] 7 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 7 getAsciiStream ->Object' : java.io.InputStream 7 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.math.BigDecimal'.) 7 getBinaryStream ->Object' : java.io.InputStream 7 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Blob'.) 7 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'boolean'.) 7 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'byte'.) 7 getBytes ->Object' : byte[] 7 getCharacterStream ->Object' : java.io.Reader 7 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Clob'.) 7 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Date'.) 7 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'double'.) 7 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'float'.) 7 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'int'.) 7 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'long'.) 7 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 7 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'short'.) 7 getString ->'0031003000372020' : java.lang.String 7 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Time'.) 7 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Timestamp'.) -----< METADATA TESTS select col_0 from bit_table ---- 1 Column : COL_0 Type : 4 TypeName : INTEGER ClassName : java.lang.Integer Label : COL_0 DisplaySz : 11 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = '100' : java.lang.Integer OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_1 from bit_table ---- 1 Column : COL_1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : COL_1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '101 ' : java.lang.String OUT = 'true ' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_2 from bit_table ---- 1 Column : COL_2 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : COL_2 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '102' : java.lang.String OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_3 from bit_table ---- 1 Column : COL_3 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : COL_3 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '103' : java.lang.String OUT = NULL OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_4 from bit_table ---- 1 Column : COL_4 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : COL_4 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL select col_5 from bit_table ---- 1 Column : COL_5 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : COL_5 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select col_6 from bit_table ---- 1 Column : COL_6 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : COL_6 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL select typecol from bit_table ---- 1 Column : TYPECOL Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : TYPECOL DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] -----< columns CAST TO type: METADATA TESTS select cast( col_0 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'INTEGER' to 'CHAR () FOR BIT DATA'. select cast( col_1 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'CHAR' to 'CHAR () FOR BIT DATA'. select cast( col_2 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'VARCHAR' to 'CHAR () FOR BIT DATA'. select cast( col_3 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'LONG VARCHAR' to 'CHAR () FOR BIT DATA'. select cast( col_4 as char (8) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL select cast( col_5 as char (8) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select cast( col_6 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'BLOB' to 'CHAR () FOR BIT DATA'. select cast( typecol as char (8) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] -----< type CAST TO types: METADATA TESTS select cast( typecol as int ) from bit_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'INTEGER'. select cast( typecol as char(10) ) from bit_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'CHAR'. select cast( typecol as varchar(80) ) from bit_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'VARCHAR'. select cast( typecol as long varchar ) from bit_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'LONG VARCHAR'. select cast( typecol as char(10) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] select cast( typecol as long varchar for bit data ) from bit_table ---- 1 Column : 1 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] select cast( typecol as blob(80) ) from bit_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob select cast( typecol as char (8 ) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] drop table bit_table create table bit_table ( dummy int , col_0 int, col_1 char(10), col_2 varchar(80), col_3 long varchar, col_4 char(10) for bit data, col_5 long varchar for bit data, col_6 blob(80), typecol char (8 ) for bit data ) insert into bit_table values ( 45 ,100,'101','102','103',X'003100300034',X'003100300035',CAST (X'003100300036' AS blob(80)),CAST (X'003100300037' AS char (8 ) for bit data) ) insert into bit_table ( col_0 ) values ( 'true' ) ERROR 42821: Columns of type 'INTEGER' cannot hold values of type 'CHAR'. insert into bit_table ( col_1 ) values ( 'true' ) insert into bit_table ( col_2 ) values ( 'true' ) insert into bit_table ( col_3 ) values ( 'true' ) insert into bit_table ( col_4 ) values cast ( X'0074007200750065' AS char(10) for bit data) insert into bit_table ( col_5 ) values cast ( X'0074007200750065' AS long varchar for bit data) insert into bit_table ( col_6 ) values cast ( X'0074007200750065' AS blob(80)) insert into bit_table ( typecol ) values cast ( X'0074007200750065' AS char (8 ) for bit data) === Columntype int select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from bit_table 0 getObject ->'100' : java.lang.Integer 0 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 0 getAsciiStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBigDecimal ->'100' : java.math.BigDecimal 0 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Blob'.) 0 getBoolean ->'true' : java.lang.Boolean 0 getByte ->'100' : java.lang.Byte 0 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'byte[]'.) 0 getCharacterStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.Reader'.) 0 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Clob'.) 0 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Date'.) 0 getDouble ->'100.0' : java.lang.Double 0 getFloat ->'100.0' : java.lang.Float 0 getInt ->'100' : java.lang.Integer 0 getLong ->'100' : java.lang.Long 0 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 0 getShort ->'100' : java.lang.Short 0 getString ->'100' : java.lang.String 0 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Time'.) 0 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Timestamp'.) === Columntype char(10) select col_1 as col_1_1, col_1 as col_1_2, col_1 as col_1_3, col_1 as col_1_4, col_1 as col_1_5, col_1 as col_1_6, col_1 as col_1_7, col_1 as col_1_8, col_1 as col_1_9, col_1 as col_1_10, col_1 as col_1_11, col_1 as col_1_12, col_1 as col_1_13, col_1 as col_1_14, col_1 as col_1_15, col_1 as col_1_16, col_1 as col_1_17, col_1 as col_1_18, col_1 as col_1_19, col_1 as col_1_20, col_1 as col_1_21 from bit_table 1 getObject ->'101 ' : java.lang.String 1 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 1 getAsciiStream ->Object' : java.io.InputStream 1 getBigDecimal ->'101' : java.math.BigDecimal 1 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 1 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 1 getBoolean ->'true' : java.lang.Boolean 1 getByte ->'101' : java.lang.Byte 1 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 1 getCharacterStream ->Object' : java.io.Reader 1 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 1 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getDouble ->'101.0' : java.lang.Double 1 getFloat ->'101.0' : java.lang.Float 1 getInt ->'101' : java.lang.Integer 1 getLong ->'101' : java.lang.Long 1 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 1 getShort ->'101' : java.lang.Short 1 getString ->'101 ' : java.lang.String 1 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype varchar(80) select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from bit_table 2 getObject ->'102' : java.lang.String 2 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 2 getAsciiStream ->Object' : java.io.InputStream 2 getBigDecimal ->'102' : java.math.BigDecimal 2 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 2 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 2 getBoolean ->'true' : java.lang.Boolean 2 getByte ->'102' : java.lang.Byte 2 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 2 getCharacterStream ->Object' : java.io.Reader 2 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 2 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getDouble ->'102.0' : java.lang.Double 2 getFloat ->'102.0' : java.lang.Float 2 getInt ->'102' : java.lang.Integer 2 getLong ->'102' : java.lang.Long 2 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 2 getShort ->'102' : java.lang.Short 2 getString ->'102' : java.lang.String 2 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype long varchar select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from bit_table 3 getObject ->'103' : java.lang.String 3 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 3 getAsciiStream ->Object' : java.io.InputStream 3 getBigDecimal ->'103' : java.math.BigDecimal 3 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.io.InputStream'.) 3 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Blob'.) 3 getBoolean ->'true' : java.lang.Boolean 3 getByte ->'103' : java.lang.Byte 3 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'byte[]'.) 3 getCharacterStream ->Object' : java.io.Reader 3 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Clob'.) 3 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getDouble ->'103.0' : java.lang.Double 3 getFloat ->'103.0' : java.lang.Float 3 getInt ->'103' : java.lang.Integer 3 getLong ->'103' : java.lang.Long 3 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 3 getShort ->'103' : java.lang.Short 3 getString ->'103' : java.lang.String 3 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype char(10) for bit data select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from bit_table 4 getObject ->Object' : byte[] 4 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 4 getAsciiStream ->Object' : java.io.InputStream 4 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.math.BigDecimal'.) 4 getBinaryStream ->Object' : java.io.InputStream 4 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Blob'.) 4 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'boolean'.) 4 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'byte'.) 4 getBytes ->Object' : byte[] 4 getCharacterStream ->Object' : java.io.Reader 4 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Clob'.) 4 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Date'.) 4 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'double'.) 4 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'float'.) 4 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'int'.) 4 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'long'.) 4 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 4 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'short'.) 4 getString ->'00310030003420202020' : java.lang.String 4 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Time'.) 4 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Timestamp'.) === Columntype long varchar for bit data select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from bit_table 5 getObject ->Object' : byte[] 5 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 5 getAsciiStream ->Object' : java.io.InputStream 5 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.math.BigDecimal'.) 5 getBinaryStream ->Object' : java.io.InputStream 5 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Blob'.) 5 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'boolean'.) 5 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'byte'.) 5 getBytes ->Object' : byte[] 5 getCharacterStream ->Object' : java.io.Reader 5 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Clob'.) 5 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Date'.) 5 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'double'.) 5 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'float'.) 5 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'int'.) 5 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'long'.) 5 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 5 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'short'.) 5 getString ->'003100300035' : java.lang.String 5 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Time'.) 5 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Timestamp'.) === Columntype blob(80) select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from bit_table 6 getObject ->Object' : java.sql.Blob 6 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 6 getAsciiStream ->Object' : java.io.InputStream 6 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.math.BigDecimal'.) 6 getBinaryStream ->Object' : java.io.InputStream 6 getBlob ->Object' : java.sql.Blob 6 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'boolean'.) 6 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'byte'.) 6 getBytes ->Object' : byte[] 6 getCharacterStream ->Object' : java.io.Reader 6 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Clob'.) 6 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Date'.) 6 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'double'.) 6 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'float'.) 6 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'int'.) 6 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'long'.) 6 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 6 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'short'.) 6 getString ->'003100300036' : java.lang.String 6 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Time'.) 6 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Timestamp'.) === Columntype char (8 ) for bit data select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from bit_table 7 getObject ->Object' : byte[] 7 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 7 getAsciiStream ->Object' : java.io.InputStream 7 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.math.BigDecimal'.) 7 getBinaryStream ->Object' : java.io.InputStream 7 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Blob'.) 7 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'boolean'.) 7 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'byte'.) 7 getBytes ->Object' : byte[] 7 getCharacterStream ->Object' : java.io.Reader 7 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Clob'.) 7 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Date'.) 7 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'double'.) 7 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'float'.) 7 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'int'.) 7 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'long'.) 7 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 7 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'short'.) 7 getString ->'0031003000372020' : java.lang.String 7 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Time'.) 7 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Timestamp'.) -----< METADATA TESTS select col_0 from bit_table ---- 1 Column : COL_0 Type : 4 TypeName : INTEGER ClassName : java.lang.Integer Label : COL_0 DisplaySz : 11 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = '100' : java.lang.Integer OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_1 from bit_table ---- 1 Column : COL_1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : COL_1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '101 ' : java.lang.String OUT = 'true ' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_2 from bit_table ---- 1 Column : COL_2 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : COL_2 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '102' : java.lang.String OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_3 from bit_table ---- 1 Column : COL_3 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : COL_3 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '103' : java.lang.String OUT = NULL OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_4 from bit_table ---- 1 Column : COL_4 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : COL_4 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL select col_5 from bit_table ---- 1 Column : COL_5 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : COL_5 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select col_6 from bit_table ---- 1 Column : COL_6 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : COL_6 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL select typecol from bit_table ---- 1 Column : TYPECOL Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : TYPECOL DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] -----< columns CAST TO type: METADATA TESTS select cast( col_0 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'INTEGER' to 'CHAR () FOR BIT DATA'. select cast( col_1 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'CHAR' to 'CHAR () FOR BIT DATA'. select cast( col_2 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'VARCHAR' to 'CHAR () FOR BIT DATA'. select cast( col_3 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'LONG VARCHAR' to 'CHAR () FOR BIT DATA'. select cast( col_4 as char (8) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL select cast( col_5 as char (8) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select cast( col_6 as char (8) for bit data ) from bit_table ERROR 42846: Cannot convert types 'BLOB' to 'CHAR () FOR BIT DATA'. select cast( typecol as char (8) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] -----< type CAST TO types: METADATA TESTS select cast( typecol as int ) from bit_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'INTEGER'. select cast( typecol as char(10) ) from bit_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'CHAR'. select cast( typecol as varchar(80) ) from bit_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'VARCHAR'. select cast( typecol as long varchar ) from bit_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'LONG VARCHAR'. select cast( typecol as char(10) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] select cast( typecol as long varchar for bit data ) from bit_table ---- 1 Column : 1 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] select cast( typecol as blob(80) ) from bit_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob select cast( typecol as char (8 ) for bit data ) from bit_table ---- 1 Column : 1 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : 1 DisplaySz : 16 Precision : 8 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] drop table bit_table create table blob_table ( dummy int , col_0 int, col_1 char(10), col_2 varchar(80), col_3 long varchar, col_4 char(10) for bit data, col_5 long varchar for bit data, col_6 blob(80), typecol blob (2 M) ) insert into blob_table values ( 45 ,100,'101','102','103',X'003100300034',X'003100300035',CAST (X'003100300036' AS blob(80)),CAST (X'003100300037' AS blob (2 M)) ) insert into blob_table ( col_0 ) values ( 'true' ) ERROR 42821: Columns of type 'INTEGER' cannot hold values of type 'CHAR'. insert into blob_table ( col_1 ) values ( 'true' ) insert into blob_table ( col_2 ) values ( 'true' ) insert into blob_table ( col_3 ) values ( 'true' ) insert into blob_table ( col_4 ) values cast ( X'0074007200750065' AS char(10) for bit data) insert into blob_table ( col_5 ) values cast ( X'0074007200750065' AS long varchar for bit data) insert into blob_table ( col_6 ) values cast ( X'0074007200750065' AS blob(80)) insert into blob_table ( typecol ) values cast ( X'0074007200750065' AS blob (2 M)) === Columntype int select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from blob_table 0 getObject ->'100' : java.lang.Integer 0 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 0 getAsciiStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBigDecimal ->'100' : java.math.BigDecimal 0 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Blob'.) 0 getBoolean ->'true' : java.lang.Boolean 0 getByte ->'100' : java.lang.Byte 0 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'byte[]'.) 0 getCharacterStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.Reader'.) 0 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Clob'.) 0 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Date'.) 0 getDouble ->'100.0' : java.lang.Double 0 getFloat ->'100.0' : java.lang.Float 0 getInt ->'100' : java.lang.Integer 0 getLong ->'100' : java.lang.Long 0 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 0 getShort ->'100' : java.lang.Short 0 getString ->'100' : java.lang.String 0 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Time'.) 0 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Timestamp'.) === Columntype char(10) select col_1 as col_1_1, col_1 as col_1_2, col_1 as col_1_3, col_1 as col_1_4, col_1 as col_1_5, col_1 as col_1_6, col_1 as col_1_7, col_1 as col_1_8, col_1 as col_1_9, col_1 as col_1_10, col_1 as col_1_11, col_1 as col_1_12, col_1 as col_1_13, col_1 as col_1_14, col_1 as col_1_15, col_1 as col_1_16, col_1 as col_1_17, col_1 as col_1_18, col_1 as col_1_19, col_1 as col_1_20, col_1 as col_1_21 from blob_table 1 getObject ->'101 ' : java.lang.String 1 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 1 getAsciiStream ->Object' : java.io.InputStream 1 getBigDecimal ->'101' : java.math.BigDecimal 1 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 1 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 1 getBoolean ->'true' : java.lang.Boolean 1 getByte ->'101' : java.lang.Byte 1 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 1 getCharacterStream ->Object' : java.io.Reader 1 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 1 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getDouble ->'101.0' : java.lang.Double 1 getFloat ->'101.0' : java.lang.Float 1 getInt ->'101' : java.lang.Integer 1 getLong ->'101' : java.lang.Long 1 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 1 getShort ->'101' : java.lang.Short 1 getString ->'101 ' : java.lang.String 1 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype varchar(80) select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from blob_table 2 getObject ->'102' : java.lang.String 2 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 2 getAsciiStream ->Object' : java.io.InputStream 2 getBigDecimal ->'102' : java.math.BigDecimal 2 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 2 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 2 getBoolean ->'true' : java.lang.Boolean 2 getByte ->'102' : java.lang.Byte 2 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 2 getCharacterStream ->Object' : java.io.Reader 2 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 2 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getDouble ->'102.0' : java.lang.Double 2 getFloat ->'102.0' : java.lang.Float 2 getInt ->'102' : java.lang.Integer 2 getLong ->'102' : java.lang.Long 2 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 2 getShort ->'102' : java.lang.Short 2 getString ->'102' : java.lang.String 2 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype long varchar select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from blob_table 3 getObject ->'103' : java.lang.String 3 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 3 getAsciiStream ->Object' : java.io.InputStream 3 getBigDecimal ->'103' : java.math.BigDecimal 3 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.io.InputStream'.) 3 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Blob'.) 3 getBoolean ->'true' : java.lang.Boolean 3 getByte ->'103' : java.lang.Byte 3 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'byte[]'.) 3 getCharacterStream ->Object' : java.io.Reader 3 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Clob'.) 3 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getDouble ->'103.0' : java.lang.Double 3 getFloat ->'103.0' : java.lang.Float 3 getInt ->'103' : java.lang.Integer 3 getLong ->'103' : java.lang.Long 3 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 3 getShort ->'103' : java.lang.Short 3 getString ->'103' : java.lang.String 3 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype char(10) for bit data select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from blob_table 4 getObject ->Object' : byte[] 4 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 4 getAsciiStream ->Object' : java.io.InputStream 4 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.math.BigDecimal'.) 4 getBinaryStream ->Object' : java.io.InputStream 4 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Blob'.) 4 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'boolean'.) 4 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'byte'.) 4 getBytes ->Object' : byte[] 4 getCharacterStream ->Object' : java.io.Reader 4 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Clob'.) 4 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Date'.) 4 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'double'.) 4 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'float'.) 4 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'int'.) 4 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'long'.) 4 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 4 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'short'.) 4 getString ->'00310030003420202020' : java.lang.String 4 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Time'.) 4 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Timestamp'.) === Columntype long varchar for bit data select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from blob_table 5 getObject ->Object' : byte[] 5 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 5 getAsciiStream ->Object' : java.io.InputStream 5 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.math.BigDecimal'.) 5 getBinaryStream ->Object' : java.io.InputStream 5 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Blob'.) 5 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'boolean'.) 5 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'byte'.) 5 getBytes ->Object' : byte[] 5 getCharacterStream ->Object' : java.io.Reader 5 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Clob'.) 5 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Date'.) 5 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'double'.) 5 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'float'.) 5 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'int'.) 5 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'long'.) 5 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 5 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'short'.) 5 getString ->'003100300035' : java.lang.String 5 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Time'.) 5 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Timestamp'.) === Columntype blob(80) select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from blob_table 6 getObject ->Object' : java.sql.Blob 6 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 6 getAsciiStream ->Object' : java.io.InputStream 6 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.math.BigDecimal'.) 6 getBinaryStream ->Object' : java.io.InputStream 6 getBlob ->Object' : java.sql.Blob 6 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'boolean'.) 6 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'byte'.) 6 getBytes ->Object' : byte[] 6 getCharacterStream ->Object' : java.io.Reader 6 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Clob'.) 6 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Date'.) 6 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'double'.) 6 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'float'.) 6 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'int'.) 6 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'long'.) 6 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 6 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'short'.) 6 getString ->'003100300036' : java.lang.String 6 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Time'.) 6 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Timestamp'.) === Columntype blob (2 M) select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from blob_table 7 getObject ->Object' : java.sql.Blob 7 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 7 getAsciiStream ->Object' : java.io.InputStream 7 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.math.BigDecimal'.) 7 getBinaryStream ->Object' : java.io.InputStream 7 getBlob ->Object' : java.sql.Blob 7 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'boolean'.) 7 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'byte'.) 7 getBytes ->Object' : byte[] 7 getCharacterStream ->Object' : java.io.Reader 7 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Clob'.) 7 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Date'.) 7 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'double'.) 7 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'float'.) 7 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'int'.) 7 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'long'.) 7 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 7 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'short'.) 7 getString ->'003100300037' : java.lang.String 7 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Time'.) 7 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Timestamp'.) -----< METADATA TESTS select col_0 from blob_table ---- 1 Column : COL_0 Type : 4 TypeName : INTEGER ClassName : java.lang.Integer Label : COL_0 DisplaySz : 11 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = '100' : java.lang.Integer OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_1 from blob_table ---- 1 Column : COL_1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : COL_1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '101 ' : java.lang.String OUT = 'true ' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_2 from blob_table ---- 1 Column : COL_2 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : COL_2 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '102' : java.lang.String OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_3 from blob_table ---- 1 Column : COL_3 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : COL_3 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '103' : java.lang.String OUT = NULL OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_4 from blob_table ---- 1 Column : COL_4 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : COL_4 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL select col_5 from blob_table ---- 1 Column : COL_5 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : COL_5 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select col_6 from blob_table ---- 1 Column : COL_6 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : COL_6 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL select typecol from blob_table ---- 1 Column : TYPECOL Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : TYPECOL DisplaySz : 4194304 Precision : 2097152 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob -----< columns CAST TO type: METADATA TESTS select cast( col_0 as blob(2 M) ) from blob_table ERROR 42846: Cannot convert types 'INTEGER' to 'BLOB'. select cast( col_1 as blob(2 M) ) from blob_table ERROR 42846: Cannot convert types 'CHAR' to 'BLOB'. select cast( col_2 as blob(2 M) ) from blob_table ERROR 42846: Cannot convert types 'VARCHAR' to 'BLOB'. select cast( col_3 as blob(2 M) ) from blob_table ERROR 42846: Cannot convert types 'LONG VARCHAR' to 'BLOB'. select cast( col_4 as blob(2 M) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4194304 Precision : 2097152 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL select cast( col_5 as blob(2 M) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4194304 Precision : 2097152 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL OUT = NULL select cast( col_6 as blob(2 M) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4194304 Precision : 2097152 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL select cast( typecol as blob(2 M) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4194304 Precision : 2097152 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob -----< type CAST TO types: METADATA TESTS select cast( typecol as int ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'INTEGER'. select cast( typecol as char(10) ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'CHAR'. select cast( typecol as varchar(80) ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'VARCHAR'. select cast( typecol as long varchar ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'LONG VARCHAR'. select cast( typecol as char(10) for bit data ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'CHAR () FOR BIT DATA'. select cast( typecol as long varchar for bit data ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'LONG VARCHAR FOR BIT DATA'. select cast( typecol as blob(80) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob select cast( typecol as blob (2 M) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4194304 Precision : 2097152 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob drop table blob_table create table blob_table ( dummy int , col_0 int, col_1 char(10), col_2 varchar(80), col_3 long varchar, col_4 char(10) for bit data, col_5 long varchar for bit data, col_6 blob(80), typecol blob (2 K) ) insert into blob_table values ( 45 ,100,'101','102','103',X'003100300034',X'003100300035',CAST (X'003100300036' AS blob(80)),CAST (X'003100300037' AS blob (2 K)) ) insert into blob_table ( col_0 ) values ( 'true' ) ERROR 42821: Columns of type 'INTEGER' cannot hold values of type 'CHAR'. insert into blob_table ( col_1 ) values ( 'true' ) insert into blob_table ( col_2 ) values ( 'true' ) insert into blob_table ( col_3 ) values ( 'true' ) insert into blob_table ( col_4 ) values cast ( X'0074007200750065' AS char(10) for bit data) insert into blob_table ( col_5 ) values cast ( X'0074007200750065' AS long varchar for bit data) insert into blob_table ( col_6 ) values cast ( X'0074007200750065' AS blob(80)) insert into blob_table ( typecol ) values cast ( X'0074007200750065' AS blob (2 K)) === Columntype int select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from blob_table 0 getObject ->'100' : java.lang.Integer 0 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 0 getAsciiStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBigDecimal ->'100' : java.math.BigDecimal 0 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Blob'.) 0 getBoolean ->'true' : java.lang.Boolean 0 getByte ->'100' : java.lang.Byte 0 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'byte[]'.) 0 getCharacterStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.Reader'.) 0 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Clob'.) 0 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Date'.) 0 getDouble ->'100.0' : java.lang.Double 0 getFloat ->'100.0' : java.lang.Float 0 getInt ->'100' : java.lang.Integer 0 getLong ->'100' : java.lang.Long 0 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 0 getShort ->'100' : java.lang.Short 0 getString ->'100' : java.lang.String 0 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Time'.) 0 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Timestamp'.) === Columntype char(10) select col_1 as col_1_1, col_1 as col_1_2, col_1 as col_1_3, col_1 as col_1_4, col_1 as col_1_5, col_1 as col_1_6, col_1 as col_1_7, col_1 as col_1_8, col_1 as col_1_9, col_1 as col_1_10, col_1 as col_1_11, col_1 as col_1_12, col_1 as col_1_13, col_1 as col_1_14, col_1 as col_1_15, col_1 as col_1_16, col_1 as col_1_17, col_1 as col_1_18, col_1 as col_1_19, col_1 as col_1_20, col_1 as col_1_21 from blob_table 1 getObject ->'101 ' : java.lang.String 1 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 1 getAsciiStream ->Object' : java.io.InputStream 1 getBigDecimal ->'101' : java.math.BigDecimal 1 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 1 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 1 getBoolean ->'true' : java.lang.Boolean 1 getByte ->'101' : java.lang.Byte 1 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 1 getCharacterStream ->Object' : java.io.Reader 1 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 1 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getDouble ->'101.0' : java.lang.Double 1 getFloat ->'101.0' : java.lang.Float 1 getInt ->'101' : java.lang.Integer 1 getLong ->'101' : java.lang.Long 1 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 1 getShort ->'101' : java.lang.Short 1 getString ->'101 ' : java.lang.String 1 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype varchar(80) select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from blob_table 2 getObject ->'102' : java.lang.String 2 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 2 getAsciiStream ->Object' : java.io.InputStream 2 getBigDecimal ->'102' : java.math.BigDecimal 2 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 2 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 2 getBoolean ->'true' : java.lang.Boolean 2 getByte ->'102' : java.lang.Byte 2 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 2 getCharacterStream ->Object' : java.io.Reader 2 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 2 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getDouble ->'102.0' : java.lang.Double 2 getFloat ->'102.0' : java.lang.Float 2 getInt ->'102' : java.lang.Integer 2 getLong ->'102' : java.lang.Long 2 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 2 getShort ->'102' : java.lang.Short 2 getString ->'102' : java.lang.String 2 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype long varchar select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from blob_table 3 getObject ->'103' : java.lang.String 3 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 3 getAsciiStream ->Object' : java.io.InputStream 3 getBigDecimal ->'103' : java.math.BigDecimal 3 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.io.InputStream'.) 3 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Blob'.) 3 getBoolean ->'true' : java.lang.Boolean 3 getByte ->'103' : java.lang.Byte 3 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'byte[]'.) 3 getCharacterStream ->Object' : java.io.Reader 3 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Clob'.) 3 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getDouble ->'103.0' : java.lang.Double 3 getFloat ->'103.0' : java.lang.Float 3 getInt ->'103' : java.lang.Integer 3 getLong ->'103' : java.lang.Long 3 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 3 getShort ->'103' : java.lang.Short 3 getString ->'103' : java.lang.String 3 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype char(10) for bit data select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from blob_table 4 getObject ->Object' : byte[] 4 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 4 getAsciiStream ->Object' : java.io.InputStream 4 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.math.BigDecimal'.) 4 getBinaryStream ->Object' : java.io.InputStream 4 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Blob'.) 4 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'boolean'.) 4 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'byte'.) 4 getBytes ->Object' : byte[] 4 getCharacterStream ->Object' : java.io.Reader 4 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Clob'.) 4 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Date'.) 4 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'double'.) 4 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'float'.) 4 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'int'.) 4 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'long'.) 4 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 4 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'short'.) 4 getString ->'00310030003420202020' : java.lang.String 4 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Time'.) 4 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Timestamp'.) === Columntype long varchar for bit data select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from blob_table 5 getObject ->Object' : byte[] 5 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 5 getAsciiStream ->Object' : java.io.InputStream 5 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.math.BigDecimal'.) 5 getBinaryStream ->Object' : java.io.InputStream 5 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Blob'.) 5 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'boolean'.) 5 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'byte'.) 5 getBytes ->Object' : byte[] 5 getCharacterStream ->Object' : java.io.Reader 5 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Clob'.) 5 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Date'.) 5 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'double'.) 5 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'float'.) 5 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'int'.) 5 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'long'.) 5 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 5 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'short'.) 5 getString ->'003100300035' : java.lang.String 5 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Time'.) 5 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Timestamp'.) === Columntype blob(80) select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from blob_table 6 getObject ->Object' : java.sql.Blob 6 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 6 getAsciiStream ->Object' : java.io.InputStream 6 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.math.BigDecimal'.) 6 getBinaryStream ->Object' : java.io.InputStream 6 getBlob ->Object' : java.sql.Blob 6 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'boolean'.) 6 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'byte'.) 6 getBytes ->Object' : byte[] 6 getCharacterStream ->Object' : java.io.Reader 6 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Clob'.) 6 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Date'.) 6 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'double'.) 6 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'float'.) 6 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'int'.) 6 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'long'.) 6 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 6 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'short'.) 6 getString ->'003100300036' : java.lang.String 6 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Time'.) 6 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Timestamp'.) === Columntype blob (2 K) select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from blob_table 7 getObject ->Object' : java.sql.Blob 7 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 7 getAsciiStream ->Object' : java.io.InputStream 7 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.math.BigDecimal'.) 7 getBinaryStream ->Object' : java.io.InputStream 7 getBlob ->Object' : java.sql.Blob 7 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'boolean'.) 7 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'byte'.) 7 getBytes ->Object' : byte[] 7 getCharacterStream ->Object' : java.io.Reader 7 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Clob'.) 7 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Date'.) 7 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'double'.) 7 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'float'.) 7 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'int'.) 7 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'long'.) 7 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 7 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'short'.) 7 getString ->'003100300037' : java.lang.String 7 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Time'.) 7 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Timestamp'.) -----< METADATA TESTS select col_0 from blob_table ---- 1 Column : COL_0 Type : 4 TypeName : INTEGER ClassName : java.lang.Integer Label : COL_0 DisplaySz : 11 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = '100' : java.lang.Integer OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_1 from blob_table ---- 1 Column : COL_1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : COL_1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '101 ' : java.lang.String OUT = 'true ' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_2 from blob_table ---- 1 Column : COL_2 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : COL_2 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '102' : java.lang.String OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_3 from blob_table ---- 1 Column : COL_3 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : COL_3 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '103' : java.lang.String OUT = NULL OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_4 from blob_table ---- 1 Column : COL_4 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : COL_4 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL select col_5 from blob_table ---- 1 Column : COL_5 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : COL_5 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select col_6 from blob_table ---- 1 Column : COL_6 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : COL_6 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL select typecol from blob_table ---- 1 Column : TYPECOL Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : TYPECOL DisplaySz : 4096 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob -----< columns CAST TO type: METADATA TESTS select cast( col_0 as blob(2 K) ) from blob_table ERROR 42846: Cannot convert types 'INTEGER' to 'BLOB'. select cast( col_1 as blob(2 K) ) from blob_table ERROR 42846: Cannot convert types 'CHAR' to 'BLOB'. select cast( col_2 as blob(2 K) ) from blob_table ERROR 42846: Cannot convert types 'VARCHAR' to 'BLOB'. select cast( col_3 as blob(2 K) ) from blob_table ERROR 42846: Cannot convert types 'LONG VARCHAR' to 'BLOB'. select cast( col_4 as blob(2 K) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4096 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL select cast( col_5 as blob(2 K) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4096 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL OUT = NULL select cast( col_6 as blob(2 K) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4096 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL select cast( typecol as blob(2 K) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4096 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob -----< type CAST TO types: METADATA TESTS select cast( typecol as int ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'INTEGER'. select cast( typecol as char(10) ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'CHAR'. select cast( typecol as varchar(80) ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'VARCHAR'. select cast( typecol as long varchar ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'LONG VARCHAR'. select cast( typecol as char(10) for bit data ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'CHAR () FOR BIT DATA'. select cast( typecol as long varchar for bit data ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'LONG VARCHAR FOR BIT DATA'. select cast( typecol as blob(80) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob select cast( typecol as blob (2 K) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 4096 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob drop table blob_table create table blob_table ( dummy int , col_0 int, col_1 char(10), col_2 varchar(80), col_3 long varchar, col_4 char(10) for bit data, col_5 long varchar for bit data, col_6 blob(80), typecol blob (64 ) ) insert into blob_table values ( 45 ,100,'101','102','103',X'003100300034',X'003100300035',CAST (X'003100300036' AS blob(80)),CAST (X'003100300037' AS blob (64 )) ) insert into blob_table ( col_0 ) values ( 'true' ) ERROR 42821: Columns of type 'INTEGER' cannot hold values of type 'CHAR'. insert into blob_table ( col_1 ) values ( 'true' ) insert into blob_table ( col_2 ) values ( 'true' ) insert into blob_table ( col_3 ) values ( 'true' ) insert into blob_table ( col_4 ) values cast ( X'0074007200750065' AS char(10) for bit data) insert into blob_table ( col_5 ) values cast ( X'0074007200750065' AS long varchar for bit data) insert into blob_table ( col_6 ) values cast ( X'0074007200750065' AS blob(80)) insert into blob_table ( typecol ) values cast ( X'0074007200750065' AS blob (64 )) === Columntype int select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from blob_table 0 getObject ->'100' : java.lang.Integer 0 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 0 getAsciiStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBigDecimal ->'100' : java.math.BigDecimal 0 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.InputStream'.) 0 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Blob'.) 0 getBoolean ->'true' : java.lang.Boolean 0 getByte ->'100' : java.lang.Byte 0 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'byte[]'.) 0 getCharacterStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.io.Reader'.) 0 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Clob'.) 0 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Date'.) 0 getDouble ->'100.0' : java.lang.Double 0 getFloat ->'100.0' : java.lang.Float 0 getInt ->'100' : java.lang.Integer 0 getLong ->'100' : java.lang.Long 0 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 0 getShort ->'100' : java.lang.Short 0 getString ->'100' : java.lang.String 0 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Time'.) 0 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 4' from a data value of type 'java.sql.Timestamp'.) === Columntype char(10) select col_1 as col_1_1, col_1 as col_1_2, col_1 as col_1_3, col_1 as col_1_4, col_1 as col_1_5, col_1 as col_1_6, col_1 as col_1_7, col_1 as col_1_8, col_1 as col_1_9, col_1 as col_1_10, col_1 as col_1_11, col_1 as col_1_12, col_1 as col_1_13, col_1 as col_1_14, col_1 as col_1_15, col_1 as col_1_16, col_1 as col_1_17, col_1 as col_1_18, col_1 as col_1_19, col_1 as col_1_20, col_1 as col_1_21 from blob_table 1 getObject ->'101 ' : java.lang.String 1 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 1 getAsciiStream ->Object' : java.io.InputStream 1 getBigDecimal ->'101' : java.math.BigDecimal 1 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 1 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 1 getBoolean ->'true' : java.lang.Boolean 1 getByte ->'101' : java.lang.Byte 1 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 1 getCharacterStream ->Object' : java.io.Reader 1 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 1 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getDouble ->'101.0' : java.lang.Double 1 getFloat ->'101.0' : java.lang.Float 1 getInt ->'101' : java.lang.Integer 1 getLong ->'101' : java.lang.Long 1 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 1 getShort ->'101' : java.lang.Short 1 getString ->'101 ' : java.lang.String 1 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype varchar(80) select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from blob_table 2 getObject ->'102' : java.lang.String 2 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 2 getAsciiStream ->Object' : java.io.InputStream 2 getBigDecimal ->'102' : java.math.BigDecimal 2 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 2 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 2 getBoolean ->'true' : java.lang.Boolean 2 getByte ->'102' : java.lang.Byte 2 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 2 getCharacterStream ->Object' : java.io.Reader 2 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 2 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getDouble ->'102.0' : java.lang.Double 2 getFloat ->'102.0' : java.lang.Float 2 getInt ->'102' : java.lang.Integer 2 getLong ->'102' : java.lang.Long 2 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 2 getShort ->'102' : java.lang.Short 2 getString ->'102' : java.lang.String 2 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 2 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype long varchar select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from blob_table 3 getObject ->'103' : java.lang.String 3 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 3 getAsciiStream ->Object' : java.io.InputStream 3 getBigDecimal ->'103' : java.math.BigDecimal 3 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.io.InputStream'.) 3 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Blob'.) 3 getBoolean ->'true' : java.lang.Boolean 3 getByte ->'103' : java.lang.Byte 3 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'byte[]'.) 3 getCharacterStream ->Object' : java.io.Reader 3 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -1' from a data value of type 'java.sql.Clob'.) 3 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getDouble ->'103.0' : java.lang.Double 3 getFloat ->'103.0' : java.lang.Float 3 getInt ->'103' : java.lang.Integer 3 getLong ->'103' : java.lang.Long 3 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 3 getShort ->'103' : java.lang.Short 3 getString ->'103' : java.lang.String 3 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 3 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype char(10) for bit data select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from blob_table 4 getObject ->Object' : byte[] 4 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 4 getAsciiStream ->Object' : java.io.InputStream 4 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.math.BigDecimal'.) 4 getBinaryStream ->Object' : java.io.InputStream 4 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Blob'.) 4 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'boolean'.) 4 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'byte'.) 4 getBytes ->Object' : byte[] 4 getCharacterStream ->Object' : java.io.Reader 4 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Clob'.) 4 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Date'.) 4 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'double'.) 4 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'float'.) 4 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'int'.) 4 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'long'.) 4 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 4 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'short'.) 4 getString ->'00310030003420202020' : java.lang.String 4 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Time'.) 4 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -3' from a data value of type 'java.sql.Timestamp'.) === Columntype long varchar for bit data select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from blob_table 5 getObject ->Object' : byte[] 5 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 5 getAsciiStream ->Object' : java.io.InputStream 5 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.math.BigDecimal'.) 5 getBinaryStream ->Object' : java.io.InputStream 5 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Blob'.) 5 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'boolean'.) 5 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'byte'.) 5 getBytes ->Object' : byte[] 5 getCharacterStream ->Object' : java.io.Reader 5 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Clob'.) 5 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Date'.) 5 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'double'.) 5 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'float'.) 5 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'int'.) 5 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'long'.) 5 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 5 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'short'.) 5 getString ->'003100300035' : java.lang.String 5 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Time'.) 5 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types -4' from a data value of type 'java.sql.Timestamp'.) === Columntype blob(80) select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from blob_table 6 getObject ->Object' : java.sql.Blob 6 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 6 getAsciiStream ->Object' : java.io.InputStream 6 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.math.BigDecimal'.) 6 getBinaryStream ->Object' : java.io.InputStream 6 getBlob ->Object' : java.sql.Blob 6 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'boolean'.) 6 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'byte'.) 6 getBytes ->Object' : byte[] 6 getCharacterStream ->Object' : java.io.Reader 6 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Clob'.) 6 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Date'.) 6 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'double'.) 6 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'float'.) 6 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'int'.) 6 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'long'.) 6 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 6 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'short'.) 6 getString ->'003100300036' : java.lang.String 6 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Time'.) 6 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Timestamp'.) === Columntype blob (64 ) select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from blob_table 7 getObject ->Object' : java.sql.Blob 7 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 7 getAsciiStream ->Object' : java.io.InputStream 7 getBigDecimal -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.math.BigDecimal'.) 7 getBinaryStream ->Object' : java.io.InputStream 7 getBlob ->Object' : java.sql.Blob 7 getBoolean -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'boolean'.) 7 getByte -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'byte'.) 7 getBytes ->Object' : byte[] 7 getCharacterStream ->Object' : java.io.Reader 7 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Clob'.) 7 getDate -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Date'.) 7 getDouble -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'double'.) 7 getFloat -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'float'.) 7 getInt -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'int'.) 7 getLong -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'long'.) 7 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 7 getShort -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'short'.) 7 getString ->'003100300037' : java.lang.String 7 getTime -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Time'.) 7 getTimeStamp -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 2004' from a data value of type 'java.sql.Timestamp'.) -----< METADATA TESTS select col_0 from blob_table ---- 1 Column : COL_0 Type : 4 TypeName : INTEGER ClassName : java.lang.Integer Label : COL_0 DisplaySz : 11 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = '100' : java.lang.Integer OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_1 from blob_table ---- 1 Column : COL_1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : COL_1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '101 ' : java.lang.String OUT = 'true ' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_2 from blob_table ---- 1 Column : COL_2 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : COL_2 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '102' : java.lang.String OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_3 from blob_table ---- 1 Column : COL_3 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : COL_3 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = '103' : java.lang.String OUT = NULL OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_4 from blob_table ---- 1 Column : COL_4 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : COL_4 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL select col_5 from blob_table ---- 1 Column : COL_5 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : COL_5 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : byte[] OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select col_6 from blob_table ---- 1 Column : COL_6 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : COL_6 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL select typecol from blob_table ---- 1 Column : TYPECOL Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : TYPECOL DisplaySz : 128 Precision : 64 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob -----< columns CAST TO type: METADATA TESTS select cast( col_0 as blob(64 ) ) from blob_table ERROR 42846: Cannot convert types 'INTEGER' to 'BLOB'. select cast( col_1 as blob(64 ) ) from blob_table ERROR 42846: Cannot convert types 'CHAR' to 'BLOB'. select cast( col_2 as blob(64 ) ) from blob_table ERROR 42846: Cannot convert types 'VARCHAR' to 'BLOB'. select cast( col_3 as blob(64 ) ) from blob_table ERROR 42846: Cannot convert types 'LONG VARCHAR' to 'BLOB'. select cast( col_4 as blob(64 ) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 128 Precision : 64 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL select cast( col_5 as blob(64 ) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 128 Precision : 64 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL OUT = NULL select cast( col_6 as blob(64 ) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 128 Precision : 64 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob OUT = NULL select cast( typecol as blob(64 ) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 128 Precision : 64 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob -----< type CAST TO types: METADATA TESTS select cast( typecol as int ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'INTEGER'. select cast( typecol as char(10) ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'CHAR'. select cast( typecol as varchar(80) ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'VARCHAR'. select cast( typecol as long varchar ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'LONG VARCHAR'. select cast( typecol as char(10) for bit data ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'CHAR () FOR BIT DATA'. select cast( typecol as long varchar for bit data ) from blob_table ERROR 42846: Cannot convert types 'BLOB' to 'LONG VARCHAR FOR BIT DATA'. select cast( typecol as blob(80) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob select cast( typecol as blob (64 ) ) from blob_table ---- 1 Column : 1 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : 1 DisplaySz : 128 Precision : 64 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Blob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob drop table blob_table create table clob_table ( dummy int , col_0 int, col_1 char(10), col_2 varchar(80), col_3 long varchar, col_4 char(10) for bit data, col_5 long varchar for bit data, col_6 blob(80), typecol clob (2 K) ) insert into clob_table values ( 45 ,100,'101','102','103',X'003100300034',X'003100300035',CAST (X'003100300036' AS blob(80)),CAST (X'003100300037' AS clob (2 K)) ) ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'CLOB'. insert into clob_table ( col_0 ) values ( 'true' ) ERROR 42821: Columns of type 'INTEGER' cannot hold values of type 'CHAR'. insert into clob_table ( col_1 ) values ( 'true' ) insert into clob_table ( col_2 ) values ( 'true' ) insert into clob_table ( col_3 ) values ( 'true' ) insert into clob_table ( col_4 ) values cast ( X'0074007200750065' AS char(10) for bit data) insert into clob_table ( col_5 ) values cast ( X'0074007200750065' AS long varchar for bit data) insert into clob_table ( col_6 ) values cast ( X'0074007200750065' AS blob(80)) insert into clob_table ( typecol ) values cast ( X'0074007200750065' AS clob (2 K)) ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'CLOB'. === Columntype int select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from clob_table 0 getObject -> EXCEPTION (null) 0 getArray -> EXCEPTION (JDBC method is not yet implemented.) 0 getAsciiStream -> EXCEPTION (null) 0 getBigDecimal -> EXCEPTION (null) 0 getBinaryStream -> EXCEPTION (null) 0 getBlob -> EXCEPTION (null) 0 getBoolean ->'false' : java.lang.Boolean 0 getByte ->'0' : java.lang.Byte 0 getBytes -> EXCEPTION (null) 0 getCharacterStream -> EXCEPTION (null) 0 getClob -> EXCEPTION (null) 0 getDate -> EXCEPTION (null) 0 getDouble ->'0.0' : java.lang.Double 0 getFloat ->'0.0' : java.lang.Float 0 getInt ->'0' : java.lang.Integer 0 getLong ->'0' : java.lang.Long 0 getRef -> EXCEPTION (JDBC method is not yet implemented.) 0 getShort ->'0' : java.lang.Short 0 getString -> EXCEPTION (null) 0 getTime -> EXCEPTION (null) 0 getTimeStamp -> EXCEPTION (null) === Columntype char(10) select col_1 as col_1_1, col_1 as col_1_2, col_1 as col_1_3, col_1 as col_1_4, col_1 as col_1_5, col_1 as col_1_6, col_1 as col_1_7, col_1 as col_1_8, col_1 as col_1_9, col_1 as col_1_10, col_1 as col_1_11, col_1 as col_1_12, col_1 as col_1_13, col_1 as col_1_14, col_1 as col_1_15, col_1 as col_1_16, col_1 as col_1_17, col_1 as col_1_18, col_1 as col_1_19, col_1 as col_1_20, col_1 as col_1_21 from clob_table 1 getObject ->'true ' : java.lang.String 1 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 1 getAsciiStream ->Object' : java.io.InputStream 1 getBigDecimal -> EXCEPTION (Invalid character string format for type java.math.BigDecimal. Caused by exception class java.lang.NumberFormatException: null) 1 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 1 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 1 getBoolean ->'true' : java.lang.Boolean 1 getByte -> EXCEPTION (Invalid character string format for type byte. Caused by exception class java.lang.NumberFormatException: true ) 1 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 1 getCharacterStream ->Object' : java.io.Reader 1 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 1 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getDouble -> EXCEPTION (Invalid character string format for type double. Caused by exception class java.lang.NumberFormatException: true) 1 getFloat -> EXCEPTION (Invalid character string format for type float. Caused by exception class java.lang.NumberFormatException: true) 1 getInt -> EXCEPTION (Invalid character string format for type int. Caused by exception class java.lang.NumberFormatException: true ) 1 getLong -> EXCEPTION (Invalid character string format for type long. Caused by exception class java.lang.NumberFormatException: true ) 1 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 1 getShort -> EXCEPTION (Invalid character string format for type short. Caused by exception class java.lang.NumberFormatException: true ) 1 getString ->'true ' : java.lang.String 1 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype varchar(80) select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from clob_table 2 getObject -> EXCEPTION (null) 2 getArray -> EXCEPTION (JDBC method is not yet implemented.) 2 getAsciiStream -> EXCEPTION (null) 2 getBigDecimal -> EXCEPTION (null) 2 getBinaryStream -> EXCEPTION (null) 2 getBlob -> EXCEPTION (null) 2 getBoolean ->'false' : java.lang.Boolean 2 getByte ->'0' : java.lang.Byte 2 getBytes -> EXCEPTION (null) 2 getCharacterStream -> EXCEPTION (null) 2 getClob -> EXCEPTION (null) 2 getDate -> EXCEPTION (null) 2 getDouble ->'0.0' : java.lang.Double 2 getFloat ->'0.0' : java.lang.Float 2 getInt ->'0' : java.lang.Integer 2 getLong ->'0' : java.lang.Long 2 getRef -> EXCEPTION (JDBC method is not yet implemented.) 2 getShort ->'0' : java.lang.Short 2 getString -> EXCEPTION (null) 2 getTime -> EXCEPTION (null) 2 getTimeStamp -> EXCEPTION (null) === Columntype long varchar select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from clob_table 3 getObject -> EXCEPTION (null) 3 getArray -> EXCEPTION (JDBC method is not yet implemented.) 3 getAsciiStream -> EXCEPTION (null) 3 getBigDecimal -> EXCEPTION (null) 3 getBinaryStream -> EXCEPTION (null) 3 getBlob -> EXCEPTION (null) 3 getBoolean ->'false' : java.lang.Boolean 3 getByte ->'0' : java.lang.Byte 3 getBytes -> EXCEPTION (null) 3 getCharacterStream -> EXCEPTION (null) 3 getClob -> EXCEPTION (null) 3 getDate -> EXCEPTION (null) 3 getDouble ->'0.0' : java.lang.Double 3 getFloat ->'0.0' : java.lang.Float 3 getInt ->'0' : java.lang.Integer 3 getLong ->'0' : java.lang.Long 3 getRef -> EXCEPTION (JDBC method is not yet implemented.) 3 getShort ->'0' : java.lang.Short 3 getString -> EXCEPTION (null) 3 getTime -> EXCEPTION (null) 3 getTimeStamp -> EXCEPTION (null) === Columntype char(10) for bit data select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from clob_table 4 getObject -> EXCEPTION (null) 4 getArray -> EXCEPTION (JDBC method is not yet implemented.) 4 getAsciiStream -> EXCEPTION (null) 4 getBigDecimal -> EXCEPTION (null) 4 getBinaryStream -> EXCEPTION (null) 4 getBlob -> EXCEPTION (null) 4 getBoolean ->'false' : java.lang.Boolean 4 getByte ->'0' : java.lang.Byte 4 getBytes -> EXCEPTION (null) 4 getCharacterStream -> EXCEPTION (null) 4 getClob -> EXCEPTION (null) 4 getDate -> EXCEPTION (null) 4 getDouble ->'0.0' : java.lang.Double 4 getFloat ->'0.0' : java.lang.Float 4 getInt ->'0' : java.lang.Integer 4 getLong ->'0' : java.lang.Long 4 getRef -> EXCEPTION (JDBC method is not yet implemented.) 4 getShort ->'0' : java.lang.Short 4 getString -> EXCEPTION (null) 4 getTime -> EXCEPTION (null) 4 getTimeStamp -> EXCEPTION (null) === Columntype long varchar for bit data select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from clob_table 5 getObject -> EXCEPTION (null) 5 getArray -> EXCEPTION (JDBC method is not yet implemented.) 5 getAsciiStream -> EXCEPTION (null) 5 getBigDecimal -> EXCEPTION (null) 5 getBinaryStream -> EXCEPTION (null) 5 getBlob -> EXCEPTION (null) 5 getBoolean ->'false' : java.lang.Boolean 5 getByte ->'0' : java.lang.Byte 5 getBytes -> EXCEPTION (null) 5 getCharacterStream -> EXCEPTION (null) 5 getClob -> EXCEPTION (null) 5 getDate -> EXCEPTION (null) 5 getDouble ->'0.0' : java.lang.Double 5 getFloat ->'0.0' : java.lang.Float 5 getInt ->'0' : java.lang.Integer 5 getLong ->'0' : java.lang.Long 5 getRef -> EXCEPTION (JDBC method is not yet implemented.) 5 getShort ->'0' : java.lang.Short 5 getString -> EXCEPTION (null) 5 getTime -> EXCEPTION (null) 5 getTimeStamp -> EXCEPTION (null) === Columntype blob(80) select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from clob_table 6 getObject -> EXCEPTION (null) 6 getArray -> EXCEPTION (JDBC method is not yet implemented.) 6 getAsciiStream -> EXCEPTION (null) 6 getBigDecimal -> EXCEPTION (null) 6 getBinaryStream -> EXCEPTION (null) 6 getBlob -> EXCEPTION (null) 6 getBoolean ->'false' : java.lang.Boolean 6 getByte ->'0' : java.lang.Byte 6 getBytes -> EXCEPTION (null) 6 getCharacterStream -> EXCEPTION (null) 6 getClob -> EXCEPTION (null) 6 getDate -> EXCEPTION (null) 6 getDouble ->'0.0' : java.lang.Double 6 getFloat ->'0.0' : java.lang.Float 6 getInt ->'0' : java.lang.Integer 6 getLong ->'0' : java.lang.Long 6 getRef -> EXCEPTION (JDBC method is not yet implemented.) 6 getShort ->'0' : java.lang.Short 6 getString -> EXCEPTION (null) 6 getTime -> EXCEPTION (null) 6 getTimeStamp -> EXCEPTION (null) === Columntype clob (2 K) select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from clob_table 7 getObject -> EXCEPTION (null) 7 getArray -> EXCEPTION (JDBC method is not yet implemented.) 7 getAsciiStream -> EXCEPTION (null) 7 getBigDecimal -> EXCEPTION (null) 7 getBinaryStream -> EXCEPTION (null) 7 getBlob -> EXCEPTION (null) 7 getBoolean ->'false' : java.lang.Boolean 7 getByte ->'0' : java.lang.Byte 7 getBytes -> EXCEPTION (null) 7 getCharacterStream -> EXCEPTION (null) 7 getClob -> EXCEPTION (null) 7 getDate -> EXCEPTION (null) 7 getDouble ->'0.0' : java.lang.Double 7 getFloat ->'0.0' : java.lang.Float 7 getInt ->'0' : java.lang.Integer 7 getLong ->'0' : java.lang.Long 7 getRef -> EXCEPTION (JDBC method is not yet implemented.) 7 getShort ->'0' : java.lang.Short 7 getString -> EXCEPTION (null) 7 getTime -> EXCEPTION (null) 7 getTimeStamp -> EXCEPTION (null) -----< METADATA TESTS select col_0 from clob_table ---- 1 Column : COL_0 Type : 4 TypeName : INTEGER ClassName : java.lang.Integer Label : COL_0 DisplaySz : 11 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_1 from clob_table ---- 1 Column : COL_1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : COL_1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = 'true ' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_2 from clob_table ---- 1 Column : COL_2 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : COL_2 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_3 from clob_table ---- 1 Column : COL_3 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : COL_3 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL select col_4 from clob_table ---- 1 Column : COL_4 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : COL_4 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select col_5 from clob_table ---- 1 Column : COL_5 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : COL_5 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL select col_6 from clob_table ---- 1 Column : COL_6 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : COL_6 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob select typecol from clob_table ---- 1 Column : TYPECOL Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : TYPECOL DisplaySz : 2048 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL -----< columns CAST TO type: METADATA TESTS select cast( col_0 as clob(2 K) ) from clob_table ERROR 42846: Cannot convert types 'INTEGER' to 'CLOB'. select cast( col_1 as clob(2 K) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 2048 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Clob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( col_2 as clob(2 K) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 2048 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = Object : java.sql.Clob OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( col_3 as clob(2 K) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 2048 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = Object : java.sql.Clob OUT = NULL OUT = NULL OUT = NULL select cast( col_4 as clob(2 K) ) from clob_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'CLOB'. select cast( col_5 as clob(2 K) ) from clob_table ERROR 42846: Cannot convert types 'LONG VARCHAR FOR BIT DATA' to 'CLOB'. select cast( col_6 as clob(2 K) ) from clob_table ERROR 42846: Cannot convert types 'BLOB' to 'CLOB'. select cast( typecol as clob(2 K) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 2048 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL -----< type CAST TO types: METADATA TESTS select cast( typecol as int ) from clob_table ERROR 42846: Cannot convert types 'CLOB' to 'INTEGER'. select cast( typecol as char(10) ) from clob_table ---- 1 Column : 1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : 1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( typecol as varchar(80) ) from clob_table ---- 1 Column : 1 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : 1 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( typecol as long varchar ) from clob_table ---- 1 Column : 1 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : 1 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( typecol as char(10) for bit data ) from clob_table ERROR 42846: Cannot convert types 'CLOB' to 'CHAR () FOR BIT DATA'. select cast( typecol as long varchar for bit data ) from clob_table ERROR 42846: Cannot convert types 'CLOB' to 'LONG VARCHAR FOR BIT DATA'. select cast( typecol as blob(80) ) from clob_table ERROR 42846: Cannot convert types 'CLOB' to 'BLOB'. select cast( typecol as clob (2 K) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 2048 Precision : 2048 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL drop table clob_table create table clob_table ( dummy int , col_0 int, col_1 char(10), col_2 varchar(80), col_3 long varchar, col_4 char(10) for bit data, col_5 long varchar for bit data, col_6 blob(80), typecol clob (64 ) ) insert into clob_table values ( 45 ,100,'101','102','103',X'003100300034',X'003100300035',CAST (X'003100300036' AS blob(80)),CAST (X'003100300037' AS clob (64 )) ) ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'CLOB'. insert into clob_table ( col_0 ) values ( 'true' ) ERROR 42821: Columns of type 'INTEGER' cannot hold values of type 'CHAR'. insert into clob_table ( col_1 ) values ( 'true' ) insert into clob_table ( col_2 ) values ( 'true' ) insert into clob_table ( col_3 ) values ( 'true' ) insert into clob_table ( col_4 ) values cast ( X'0074007200750065' AS char(10) for bit data) insert into clob_table ( col_5 ) values cast ( X'0074007200750065' AS long varchar for bit data) insert into clob_table ( col_6 ) values cast ( X'0074007200750065' AS blob(80)) insert into clob_table ( typecol ) values cast ( X'0074007200750065' AS clob (64 )) ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'CLOB'. === Columntype int select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from clob_table 0 getObject -> EXCEPTION (null) 0 getArray -> EXCEPTION (JDBC method is not yet implemented.) 0 getAsciiStream -> EXCEPTION (null) 0 getBigDecimal -> EXCEPTION (null) 0 getBinaryStream -> EXCEPTION (null) 0 getBlob -> EXCEPTION (null) 0 getBoolean ->'false' : java.lang.Boolean 0 getByte ->'0' : java.lang.Byte 0 getBytes -> EXCEPTION (null) 0 getCharacterStream -> EXCEPTION (null) 0 getClob -> EXCEPTION (null) 0 getDate -> EXCEPTION (null) 0 getDouble ->'0.0' : java.lang.Double 0 getFloat ->'0.0' : java.lang.Float 0 getInt ->'0' : java.lang.Integer 0 getLong ->'0' : java.lang.Long 0 getRef -> EXCEPTION (JDBC method is not yet implemented.) 0 getShort ->'0' : java.lang.Short 0 getString -> EXCEPTION (null) 0 getTime -> EXCEPTION (null) 0 getTimeStamp -> EXCEPTION (null) === Columntype char(10) select col_1 as col_1_1, col_1 as col_1_2, col_1 as col_1_3, col_1 as col_1_4, col_1 as col_1_5, col_1 as col_1_6, col_1 as col_1_7, col_1 as col_1_8, col_1 as col_1_9, col_1 as col_1_10, col_1 as col_1_11, col_1 as col_1_12, col_1 as col_1_13, col_1 as col_1_14, col_1 as col_1_15, col_1 as col_1_16, col_1 as col_1_17, col_1 as col_1_18, col_1 as col_1_19, col_1 as col_1_20, col_1 as col_1_21 from clob_table 1 getObject ->'true ' : java.lang.String 1 getArray -> EXCEPTION (Feature not implemented: getArray(int).) 1 getAsciiStream ->Object' : java.io.InputStream 1 getBigDecimal -> EXCEPTION (Invalid character string format for type java.math.BigDecimal. Caused by exception class java.lang.NumberFormatException: null) 1 getBinaryStream -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.io.InputStream'.) 1 getBlob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Blob'.) 1 getBoolean ->'true' : java.lang.Boolean 1 getByte -> EXCEPTION (Invalid character string format for type byte. Caused by exception class java.lang.NumberFormatException: true ) 1 getBytes -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'byte[]'.) 1 getCharacterStream ->Object' : java.io.Reader 1 getClob -> EXCEPTION (An attempt was made to get a data value of type 'java.sql.Types 12' from a data value of type 'java.sql.Clob'.) 1 getDate -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getDouble -> EXCEPTION (Invalid character string format for type double. Caused by exception class java.lang.NumberFormatException: true) 1 getFloat -> EXCEPTION (Invalid character string format for type float. Caused by exception class java.lang.NumberFormatException: true) 1 getInt -> EXCEPTION (Invalid character string format for type int. Caused by exception class java.lang.NumberFormatException: true ) 1 getLong -> EXCEPTION (Invalid character string format for type long. Caused by exception class java.lang.NumberFormatException: true ) 1 getRef -> EXCEPTION (Feature not implemented: getRef(int).) 1 getShort -> EXCEPTION (Invalid character string format for type short. Caused by exception class java.lang.NumberFormatException: true ) 1 getString ->'true ' : java.lang.String 1 getTime -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: null) 1 getTimeStamp -> EXCEPTION (The syntax of the string representation of a datetime value is incorrect. Caused by exception class java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff) === Columntype varchar(80) select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from clob_table 2 getObject -> EXCEPTION (null) 2 getArray -> EXCEPTION (JDBC method is not yet implemented.) 2 getAsciiStream -> EXCEPTION (null) 2 getBigDecimal -> EXCEPTION (null) 2 getBinaryStream -> EXCEPTION (null) 2 getBlob -> EXCEPTION (null) 2 getBoolean ->'false' : java.lang.Boolean 2 getByte ->'0' : java.lang.Byte 2 getBytes -> EXCEPTION (null) 2 getCharacterStream -> EXCEPTION (null) 2 getClob -> EXCEPTION (null) 2 getDate -> EXCEPTION (null) 2 getDouble ->'0.0' : java.lang.Double 2 getFloat ->'0.0' : java.lang.Float 2 getInt ->'0' : java.lang.Integer 2 getLong ->'0' : java.lang.Long 2 getRef -> EXCEPTION (JDBC method is not yet implemented.) 2 getShort ->'0' : java.lang.Short 2 getString -> EXCEPTION (null) 2 getTime -> EXCEPTION (null) 2 getTimeStamp -> EXCEPTION (null) === Columntype long varchar select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from clob_table 3 getObject -> EXCEPTION (null) 3 getArray -> EXCEPTION (JDBC method is not yet implemented.) 3 getAsciiStream -> EXCEPTION (null) 3 getBigDecimal -> EXCEPTION (null) 3 getBinaryStream -> EXCEPTION (null) 3 getBlob -> EXCEPTION (null) 3 getBoolean ->'false' : java.lang.Boolean 3 getByte ->'0' : java.lang.Byte 3 getBytes -> EXCEPTION (null) 3 getCharacterStream -> EXCEPTION (null) 3 getClob -> EXCEPTION (null) 3 getDate -> EXCEPTION (null) 3 getDouble ->'0.0' : java.lang.Double 3 getFloat ->'0.0' : java.lang.Float 3 getInt ->'0' : java.lang.Integer 3 getLong ->'0' : java.lang.Long 3 getRef -> EXCEPTION (JDBC method is not yet implemented.) 3 getShort ->'0' : java.lang.Short 3 getString -> EXCEPTION (null) 3 getTime -> EXCEPTION (null) 3 getTimeStamp -> EXCEPTION (null) === Columntype char(10) for bit data select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from clob_table 4 getObject -> EXCEPTION (null) 4 getArray -> EXCEPTION (JDBC method is not yet implemented.) 4 getAsciiStream -> EXCEPTION (null) 4 getBigDecimal -> EXCEPTION (null) 4 getBinaryStream -> EXCEPTION (null) 4 getBlob -> EXCEPTION (null) 4 getBoolean ->'false' : java.lang.Boolean 4 getByte ->'0' : java.lang.Byte 4 getBytes -> EXCEPTION (null) 4 getCharacterStream -> EXCEPTION (null) 4 getClob -> EXCEPTION (null) 4 getDate -> EXCEPTION (null) 4 getDouble ->'0.0' : java.lang.Double 4 getFloat ->'0.0' : java.lang.Float 4 getInt ->'0' : java.lang.Integer 4 getLong ->'0' : java.lang.Long 4 getRef -> EXCEPTION (JDBC method is not yet implemented.) 4 getShort ->'0' : java.lang.Short 4 getString -> EXCEPTION (null) 4 getTime -> EXCEPTION (null) 4 getTimeStamp -> EXCEPTION (null) === Columntype long varchar for bit data select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from clob_table 5 getObject -> EXCEPTION (null) 5 getArray -> EXCEPTION (JDBC method is not yet implemented.) 5 getAsciiStream -> EXCEPTION (null) 5 getBigDecimal -> EXCEPTION (null) 5 getBinaryStream -> EXCEPTION (null) 5 getBlob -> EXCEPTION (null) 5 getBoolean ->'false' : java.lang.Boolean 5 getByte ->'0' : java.lang.Byte 5 getBytes -> EXCEPTION (null) 5 getCharacterStream -> EXCEPTION (null) 5 getClob -> EXCEPTION (null) 5 getDate -> EXCEPTION (null) 5 getDouble ->'0.0' : java.lang.Double 5 getFloat ->'0.0' : java.lang.Float 5 getInt ->'0' : java.lang.Integer 5 getLong ->'0' : java.lang.Long 5 getRef -> EXCEPTION (JDBC method is not yet implemented.) 5 getShort ->'0' : java.lang.Short 5 getString -> EXCEPTION (null) 5 getTime -> EXCEPTION (null) 5 getTimeStamp -> EXCEPTION (null) === Columntype blob(80) select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from clob_table 6 getObject -> EXCEPTION (null) 6 getArray -> EXCEPTION (JDBC method is not yet implemented.) 6 getAsciiStream -> EXCEPTION (null) 6 getBigDecimal -> EXCEPTION (null) 6 getBinaryStream -> EXCEPTION (null) 6 getBlob -> EXCEPTION (null) 6 getBoolean ->'false' : java.lang.Boolean 6 getByte ->'0' : java.lang.Byte 6 getBytes -> EXCEPTION (null) 6 getCharacterStream -> EXCEPTION (null) 6 getClob -> EXCEPTION (null) 6 getDate -> EXCEPTION (null) 6 getDouble ->'0.0' : java.lang.Double 6 getFloat ->'0.0' : java.lang.Float 6 getInt ->'0' : java.lang.Integer 6 getLong ->'0' : java.lang.Long 6 getRef -> EXCEPTION (JDBC method is not yet implemented.) 6 getShort ->'0' : java.lang.Short 6 getString -> EXCEPTION (null) 6 getTime -> EXCEPTION (null) 6 getTimeStamp -> EXCEPTION (null) === Columntype clob (64 ) select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from clob_table 7 getObject -> EXCEPTION (null) 7 getArray -> EXCEPTION (JDBC method is not yet implemented.) 7 getAsciiStream -> EXCEPTION (null) 7 getBigDecimal -> EXCEPTION (null) 7 getBinaryStream -> EXCEPTION (null) 7 getBlob -> EXCEPTION (null) 7 getBoolean ->'false' : java.lang.Boolean 7 getByte ->'0' : java.lang.Byte 7 getBytes -> EXCEPTION (null) 7 getCharacterStream -> EXCEPTION (null) 7 getClob -> EXCEPTION (null) 7 getDate -> EXCEPTION (null) 7 getDouble ->'0.0' : java.lang.Double 7 getFloat ->'0.0' : java.lang.Float 7 getInt ->'0' : java.lang.Integer 7 getLong ->'0' : java.lang.Long 7 getRef -> EXCEPTION (JDBC method is not yet implemented.) 7 getShort ->'0' : java.lang.Short 7 getString -> EXCEPTION (null) 7 getTime -> EXCEPTION (null) 7 getTimeStamp -> EXCEPTION (null) -----< METADATA TESTS select col_0 from clob_table ---- 1 Column : COL_0 Type : 4 TypeName : INTEGER ClassName : java.lang.Integer Label : COL_0 DisplaySz : 11 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_1 from clob_table ---- 1 Column : COL_1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : COL_1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = 'true ' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_2 from clob_table ---- 1 Column : COL_2 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : COL_2 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL OUT = NULL select col_3 from clob_table ---- 1 Column : COL_3 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : COL_3 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = 'true' : java.lang.String OUT = NULL OUT = NULL OUT = NULL select col_4 from clob_table ---- 1 Column : COL_4 Type : -2 TypeName : CHAR FOR BIT DATA ClassName : byte[] Label : COL_4 DisplaySz : 20 Precision : 10 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL OUT = NULL select col_5 from clob_table ---- 1 Column : COL_5 Type : -4 TypeName : LONG VARCHAR FOR BIT DATA ClassName : byte[] Label : COL_5 DisplaySz : 65400 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : byte[] OUT = NULL select col_6 from clob_table ---- 1 Column : COL_6 Type : 2004 TypeName : BLOB ClassName : java.sql.Blob Label : COL_6 DisplaySz : 160 Precision : 80 Scale : 0 isCurrency: false isCaseSens: false isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = Object : java.sql.Blob select typecol from clob_table ---- 1 Column : TYPECOL Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : TYPECOL DisplaySz : 64 Precision : 64 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL -----< columns CAST TO type: METADATA TESTS select cast( col_0 as clob(64 ) ) from clob_table ERROR 42846: Cannot convert types 'INTEGER' to 'CLOB'. select cast( col_1 as clob(64 ) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 64 Precision : 64 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = Object : java.sql.Clob OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( col_2 as clob(64 ) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 64 Precision : 64 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = Object : java.sql.Clob OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( col_3 as clob(64 ) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 64 Precision : 64 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = Object : java.sql.Clob OUT = NULL OUT = NULL OUT = NULL select cast( col_4 as clob(64 ) ) from clob_table ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'CLOB'. select cast( col_5 as clob(64 ) ) from clob_table ERROR 42846: Cannot convert types 'LONG VARCHAR FOR BIT DATA' to 'CLOB'. select cast( col_6 as clob(64 ) ) from clob_table ERROR 42846: Cannot convert types 'BLOB' to 'CLOB'. select cast( typecol as clob(64 ) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 64 Precision : 64 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL -----< type CAST TO types: METADATA TESTS select cast( typecol as int ) from clob_table ERROR 42846: Cannot convert types 'CLOB' to 'INTEGER'. select cast( typecol as char(10) ) from clob_table ---- 1 Column : 1 Type : 1 TypeName : CHAR ClassName : java.lang.String Label : 1 DisplaySz : 10 Precision : 10 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( typecol as varchar(80) ) from clob_table ---- 1 Column : 1 Type : 12 TypeName : VARCHAR ClassName : java.lang.String Label : 1 DisplaySz : 80 Precision : 80 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( typecol as long varchar ) from clob_table ---- 1 Column : 1 Type : -1 TypeName : LONG VARCHAR ClassName : java.lang.String Label : 1 DisplaySz : 32700 Precision : 32700 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL select cast( typecol as char(10) for bit data ) from clob_table ERROR 42846: Cannot convert types 'CLOB' to 'CHAR () FOR BIT DATA'. select cast( typecol as long varchar for bit data ) from clob_table ERROR 42846: Cannot convert types 'CLOB' to 'LONG VARCHAR FOR BIT DATA'. select cast( typecol as blob(80) ) from clob_table ERROR 42846: Cannot convert types 'CLOB' to 'BLOB'. select cast( typecol as clob (64 ) ) from clob_table ---- 1 Column : 1 Type : 2005 TypeName : CLOB ClassName : java.sql.Clob Label : 1 DisplaySz : 64 Precision : 64 Scale : 0 isCurrency: false isCaseSens: true isDefWrite: false isWrite : false isSearchab: true OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL OUT = NULL drop table clob_table -----< BLOB Insertion Tests create table blobCheck (bl blob(80)) insert into blobCheck (bl ) values ('string' ) ERROR 42821: Columns of type 'BLOB' cannot hold values of type 'CHAR'. insert into blobCheck (bl ) values (cast (X'0073007400720069006e0067' as blob(80)) ) insert into blobCheck (bl ) values (X'48' ) ERROR 42821: Columns of type 'BLOB' cannot hold values of type 'CHAR () FOR BIT DATA'. insert into blobCheck (bl ) values (cast (X'C8' as blob(80)) ) insert into blobCheck (bl ) values ( X'a78a' ) ERROR 42821: Columns of type 'BLOB' cannot hold values of type 'CHAR () FOR BIT DATA'. insert into blobCheck (bl ) values (cast (X'a78a' as blob(80)) ) insert into blobCheck (bl ) values ('string' ) ERROR 42821: Columns of type 'BLOB' cannot hold values of type 'CHAR'. insert into blobCheck (bl ) values (cast (X'0073007400720069006e0067' as blob(80)) ) insert into blobCheck (bl ) values (X'48' ) ERROR 42821: Columns of type 'BLOB' cannot hold values of type 'CHAR () FOR BIT DATA'. insert into blobCheck (bl ) values (cast (X'C8' as blob(80)) ) insert into blobCheck (bl ) values ( X'a78a' ) ERROR 42821: Columns of type 'BLOB' cannot hold values of type 'CHAR () FOR BIT DATA'. insert into blobCheck (bl ) values (cast (X'a78a' as blob(80)) ) drop table blobCheck