db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DDLUTILS-155) type cast to 'LONG VARCHAR' fails
Date Thu, 08 Feb 2007 07:23:05 GMT

     [ https://issues.apache.org/jira/browse/DDLUTILS-155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Dudziak resolved DDLUTILS-155.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0

I've changed this to use the CAST function instead (which has no problems with "LONG VARCHAR").

> type cast to 'LONG VARCHAR' fails
> ---------------------------------
>
>                 Key: DDLUTILS-155
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-155
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - DB2
>         Environment: DB2 v8 on Windows
>            Reporter: Stefan Huber
>         Assigned To: Thomas Dudziak
>            Priority: Minor
>             Fix For: 1.0
>
>
> I tried to update an existing database. Within the update the type of a column changed
from CLOB to LONG VARCHAR. 
> This procedure failed because the SqlBuilder created the following statement
>         INSERT INTO LOGMESSAGES_ (MESSAGEID,MESSAGETEXT) 
>         SELECT MESSAGEID,LONG VARCHAR (MESSAGETEXT) FROM LOGMESSAGES
> which does not work on any database.
> I resolved this effect by simply replacing the blank in 'LONG VARCHAR' with an underscore
(method Db2Builder.writeCastExpression(...)).
> The resulting statement contains a valid cast expression.
>         INSERT INTO LOGMESSAGES_ (MESSAGEID,MESSAGETEXT) 
>         SELECT MESSAGEID,LONG_VARCHAR (MESSAGETEXT) FROM LOGMESSAGES

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message