db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zorro <hz0...@gmail.com>
Subject Re: NullPointerException in Derby 10.9.1.0
Date Wed, 05 Dec 2012 19:11:31 GMT
Op 4-12-2012 23:08, Knut Anders Hatlen schreef:
> Kim Haase <camilla.haase@oracle.com> writes:
>
>> Should I file a doc JIRA to clarify that ALTER TABLE adds the new
>> column at the end?
> That would be great.
>
>> It seems obvious, but perhaps we should clarify
>> that a programmatic attempt to change the data type of a column will
>> still result in the changed column being appended.
>>
>> I notice it is possible to change the data type of a column using
>> "ALTER TABLE ALTER column-name SET DATA TYPE", but you can only change
>> the type to VARCHAR or VARCHAR FOR BIT DATA. Do you know why that is?
> We probably only allow changing the maximum length of columns that
> already are VARCHAR or VARCHAR FOR BIT DATA. Since changing the maximum
> length can be done in the table meta-data without changing the stored
> format of each value, that's easier to support than the general case.
> For example, changing the type from INT to DOUBLE would require an
> update of every row in the table, since they have different formats.
> That's my guess, at least.

Hi Knut,

Thanks for looking at this.

As you described it seemed to be related to the Order By in the Select 
phrase of the bulk Insert.

Therefore I removed the Order By of the Select and now the bulk Insert 
went well.

The Order By was not necessary for my conversion.
Out of convenience I used copy/paste to the Insert statement.

I hope my issue helped to clarify the Insert procedure in Derby.

Kind regards,
Harm-Jan Zwinderman


Mime
View raw message