db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david myers <david.myers.scibearsp...@gmail.com>
Subject Re: Error 42x71:Type de donnÚes 'BOOLEAN' non valide: when doing a Create Table [table] as Select * from [otherTable] with no data
Date Thu, 06 Sep 2012 18:51:02 GMT
On 06/09/12 19:43, Rick Hillegas wrote:
> On 9/6/12 9:41 AM, Bryan Pendleton wrote:
>>> So the 'boolean' word definately works, just not in the instance of a
>>> create table as statement.
>>
>> Yes, that sounds like a bug. Boolean has recently been added to the
>> DDL language, and this might have been missed.
> Right, I agree with Bryan that this is a bug. This limitation was put 
> in when CREATE TABLE AS SELECT was added. At that time, the BOOLEAN 
> datatype was still disabled for user tables. Without this limitation, 
> people could have created user tables with BOOLEAN columns by issuing 
> a CREATE TABLE AS SELECT against a system table with a BOOLEAN column. 
> I have logged https://issues.apache.org/jira/browse/DERBY-5918 to 
> track this issue. I think it should be easy to fix. Thanks for finding 
> this bug, David.
>
> Regards,
> -Rick
>>
>> Did you try searching JIRA to see if it's a known bug? If not, please
>> log a bug with your reproduction script.
>>
>>> What else can I now do?
>>
>> Did you try doing CREATE TABLE first, followed by INSERT INTO 
>> newtable SELECT FROM oldtable?
>>
>> If INSERT ... SELECT has the same bug, then you'll probably have to
>> write a short program to do the processing yourself.
>>
>> thanks,
>>
>> bryan
>>
>>
>>
>
Hello All,

@Bryan

I know for a fact that I can insert into a table boolean values in from 
a prepared statement, I have a script that does it for about 300+ rows. 
It doesn't do an insert into... as select * from because of the 
limitations of the data source.

@Rik

No probs for finding the bug, I was a little surprised that I got the 
error, my script just stopped with a strange SQL error. I was very 
confused as the rest of the script hapily copied lots of rows with at 
least a handful of boolean values in them. I did find things on JIRA 
about the <create table as> being added, but couldn't add a bug as I 
couldn't remember my jira log on (its saved on my pc at home not at work).

Maybe I'll try to fix this bug after I've finished my other enhancement 
I'm wanting to write.

David

Mime
View raw message