My Oracle Support Banner

DG4DRDA - Create Table As Select from DB2 Copies Unvalidated Data And Constraint (Doc ID 2946921.1)

Last updated on MAY 04, 2023

Applies to:

Oracle Database Gateway for DRDA - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

In the FDS:
  Create a table with a CHAR column with the NOT NULL modifier and populate it with some empty strings.
  Create a view that does a select of such table, trimming blank spaces from the char column.

In Oracle:
  Do a "create table <or_table_name> as select * from <remote_view_name>".
  Do a describe of the or_table_name, check that the *char* column is defined as not null.
  Do a select of the or_table_name and check if it has empty strings.
 
If the column is defined as not null, and the column contains empty strings, you have reproduced this issue.
 

WORKAROUND:
Do the create statement on the original table, and not the view that trimmed the blanks from the char column.


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.