You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Susan Cline (JIRA)" <de...@db.apache.org> on 2006/09/01 20:19:23 UTC

[jira] Created: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

[DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
--------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-1804
                 URL: http://issues.apache.org/jira/browse/DERBY-1804
             Project: Derby
          Issue Type: Bug
          Components: Documentation
    Affects Versions: 10.2.2.0
            Reporter: Susan Cline


The CAST function documentation contains a table which lists the explicit conversions between data types.
http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html

For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;

ij> create table smallint_tab(id integer, col2 smallint);
0 rows inserted/updated/deleted
ij> insert into smallint_tab values (1, 10);
1 row inserted/updated/deleted
ij> select cast(col2 as varchar(10)) from smallint_tab;
ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.

Also from integer to varchar does not work: 

ij> create table int_tab (id integer, col2 integer);
0 rows inserted/updated/deleted
ij> insert into int_tab values (1, 10);
1 row inserted/updated/deleted
ij> select cast(col2 as varchar(20)) from int_tab;
ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.

Bigint neither: 

ij> create table bigint_tab (id integer, col2 bigint); 
0 rows inserted/updated/deleted 
ij> insert into bigint_tab values (1, 10); 
ij> select cast(col2 as varchar(20)) from bigint_tab; 
ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 

Nor decimal: 

ij> create table decimal_tab (id integer, col2 decimal); 
0 rows inserted/updated/deleted 
ij> insert into decimal_tab values (1, 1.88); 
1 row inserted/updated/deleted 
ij> select cast(col2 as varchar(3)) from decimal_tab; 
ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 

The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
are listed.  They need to be removed;

ij> create table date_tab (id integer, col2 date);
0 rows inserted/updated/deleted
ij> insert into date_tab values (1, CURRENT_DATE);
1 row inserted/updated/deleted
ij> select cast(col2 as timestamp) from date_tab;
ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.

ij> create table time_tab (id integer, col2 time);
0 rows inserted/updated/deleted
ij> insert into time_tab values (1, CURRENT_TIME);
1 row inserted/updated/deleted
ij> select cast(col2 as timestamp) from time_tab;
ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1804?page=all ]

Laura Stewart updated DERBY-1804:
---------------------------------

    Attachment: derby1804.diff
                rrefsqlj33562.html

Updated the DATE and TIME data types
and added a clarification about how to 
understand the table.

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>         Attachments: derby1804.diff, rrefsqlj33562.html
>
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1804?page=all ]

Laura Stewart closed DERBY-1804.
--------------------------------

    Resolution: Fixed

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>             Fix For: 10.2.1.6, 10.3.0.0
>
>         Attachments: derby1804.diff, rrefsqlj33562.html
>
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1804?page=all ]

Laura Stewart reopened DERBY-1804:
----------------------------------

             
Reopening to change affects versions

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>             Fix For: 10.3.0.0, 10.2.1.6
>
>         Attachments: derby1804.diff, rrefsqlj33562.html
>
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1804?page=comments#action_12433912 ] 
            
Laura Stewart commented on DERBY-1804:
--------------------------------------

Susan - As I read the CAST table, the "Source" is the first column.  The "Target" is the first row.  When I look at source=SMALLINT (in the second row), there is a dash under the VARCHAR column, meaning that you cannot cast a SMALLINT column as a VARCHAR.  Conversely, the table indicates that you can cast a VARCHAR as a SMALLINT.

I believe that your tests were from SMALLINT, INTEGER, BIGINT and DECIMAL to VARCHAR?  
The table currently does show that you cannot perform those casts.
Do you also mean that you can't cast a VARCHAR as a SMALLINT, INTEGER, BIGINT or DECIMAL  ???

I have corrected the DATE to TIMESTAMP and TIME to TIMESTAMP columns.

I produce a patch once you let me know about VARCHAR.

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1804?page=all ]

Knut Anders Hatlen resolved DERBY-1804.
---------------------------------------

    Fix Version/s: 10.3.0.0
       Resolution: Fixed
       Derby Info:   (was: [Patch Available])

Thanks, Laura and Susan! Committed revision 446543.

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>             Fix For: 10.3.0.0
>
>         Attachments: derby1804.diff, rrefsqlj33562.html
>
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1804?page=all ]

Laura Stewart updated DERBY-1804:
---------------------------------

    Derby Info: [Patch Available]

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>         Attachments: derby1804.diff, rrefsqlj33562.html
>
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1804?page=all ]

Laura Stewart closed DERBY-1804.
--------------------------------


> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>             Fix For: 10.3.0.0
>
>         Attachments: derby1804.diff, rrefsqlj33562.html
>
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1804?page=all ]

Laura Stewart reassigned DERBY-1804:
------------------------------------

    Assignee: Laura Stewart

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1804?page=comments#action_12433933 ] 
            
Laura Stewart commented on DERBY-1804:
--------------------------------------

Yes, it took me a try to two to understand how the table is setup.  
I will add some text to clarify it :-)

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Laura Stewart (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1804?page=all ]

Laura Stewart updated DERBY-1804:
---------------------------------

    Fix Version/s: 10.2.1.6

Updating Fix versions (not affects versions)

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>             Fix For: 10.3.0.0, 10.2.1.6
>
>         Attachments: derby1804.diff, rrefsqlj33562.html
>
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Susan Cline (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1804?page=comments#action_12434842 ] 
            
Susan Cline commented on DERBY-1804:
------------------------------------

This patch looks good to me Laura.  Although it still took me a while to understand that table ;-) looking at it again.



> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>         Attachments: derby1804.diff, rrefsqlj33562.html
>
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1804) [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases

Posted by "Susan Cline (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1804?page=comments#action_12433931 ] 
            
Susan Cline commented on DERBY-1804:
------------------------------------

Hi Laura,

Whoa .. I think that I'm confused about how to read this table.  The way I was reading it
was down the column instead of across on the row.  This is my mistake and therefore the document as it stands is correct. However, do you think it would be possible to make a change from this:

The first column on the table lists the source types, while the first row lists the target types. A "Y" indicates that the source to the target is a valid conversion.

to this: (or whatever you think clarifies how to read this table, and maybe it does not need clarification, it might have just been my misread.):

The column on the table lists the source types, while the row lists the target types.
 A "Y" indicates that the source to the target is a valid conversion.
For example,  the source represented by the first column lists the target types in the first row, the source represented by the second column lists the target types in the second row and so on.

> [DOC] CAST conversions between data types table is incorrect in Reference manual in some VARCHAR and TIMESTAMP cases
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1804
>                 URL: http://issues.apache.org/jira/browse/DERBY-1804
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.2.0
>            Reporter: Susan Cline
>         Assigned To: Laura Stewart
>
> The CAST function documentation contains a table which lists the explicit conversions between data types.
> http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html
> For the 'SOURCE' values (the columns) of SMALLINT, INTEGER, BIGINT and DECIMAL the CAST to VARCHAR is listed.  However, they should not be listed because this cast is not allowed.  See the output below;
> ij> create table smallint_tab(id integer, col2 smallint);
> 0 rows inserted/updated/deleted
> ij> insert into smallint_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(10)) from smallint_tab;
> ERROR 42846: Cannot convert types 'SMALLINT' to 'VARCHAR'.
> Also from integer to varchar does not work: 
> ij> create table int_tab (id integer, col2 integer);
> 0 rows inserted/updated/deleted
> ij> insert into int_tab values (1, 10);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as varchar(20)) from int_tab;
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> Bigint neither: 
> ij> create table bigint_tab (id integer, col2 bigint); 
> 0 rows inserted/updated/deleted 
> ij> insert into bigint_tab values (1, 10); 
> ij> select cast(col2 as varchar(20)) from bigint_tab; 
> ERROR 42846: Cannot convert types 'BIGINT' to 'VARCHAR'. 
> Nor decimal: 
> ij> create table decimal_tab (id integer, col2 decimal); 
> 0 rows inserted/updated/deleted 
> ij> insert into decimal_tab values (1, 1.88); 
> 1 row inserted/updated/deleted 
> ij> select cast(col2 as varchar(3)) from decimal_tab; 
> ERROR 42846: Cannot convert types 'DECIMAL' to 'VARCHAR'. 
> The Cast from DATE to TIMESTAMP and TIME to TIMESTAMP also are not allowed, although they
> are listed.  They need to be removed;
> ij> create table date_tab (id integer, col2 date);
> 0 rows inserted/updated/deleted
> ij> insert into date_tab values (1, CURRENT_DATE);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from date_tab;
> ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
> ij> create table time_tab (id integer, col2 time);
> 0 rows inserted/updated/deleted
> ij> insert into time_tab values (1, CURRENT_TIME);
> 1 row inserted/updated/deleted
> ij> select cast(col2 as timestamp) from time_tab;
> ERROR 42846: Cannot convert types 'TIME' to 'TIMESTAMP'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira