db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Huber (JIRA)" <j...@apache.org>
Subject [jira] Created: (DDLUTILS-155) type cast to 'long varchar' fails
Date Wed, 07 Feb 2007 13:48:05 GMT
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


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