Error when importing data in DB2 using BOOLEAN data type
a
anonymous
started a topic
almost 12 years ago
[This topic is migrated from our old forums. The original author name has been removed]
When importing data into DB2 using the "Import table data" wizard and "New database table" option enabled, the presence of a BOOLEAN data type in the generated SQL code causes the following error:
Create Table failed: A "BOOLEAN" data type is not supported in the context where it is being used.. SQLCODE=-20441, SQLSTATE=428H2, DRIVER=4.13.127
Apparently DB2 does not support the BOOLEAN data type for table columns.
The BOOLEAN type is a DB2 built-in data type that can only be used as the data type of:
- A local variable in a compound SQL (compiled) statement
- A parameter of an SQL routine
- The returns type of an SQL function
- A global variable
Product: DbVisualizer Personal 8.0.12
Build: #1776 (2012/11/27 10:13)
Java VM: Java HotSpot(TM) Client VM
Java Version: 1.7.0_09
Java Vendor: Oracle Corporation
OS Name: Windows XP
OS Arch: x86
OS Version: 5.1
Re: Error when importing data in DB2 using BOOLEAN data type
Hi Christos,
Thanks for reporting this. We will look into removing BOOLEAN, and possibly other types that cannot be used for columns, from the Data Type list.
As a work-around, you can manually change BOOLEAN to SMALLINT when defining the columns for the table.
Best Regards,
Hans
a
anonymous
said
almost 12 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Error when importing data in DB2 using BOOLEAN data type
Thanks a lot for the reply.
Roger Bjärevall
said
almost 12 years ago
[This reply is migrated from our old forums.]
Re: Error when importing data in DB2 using BOOLEAN data type
Christos,
This is now fixed in the latest 9.0.3 version.
http://www.dbvis.com/download/
Regards
Roger
anonymous