6706 The string contains an untranslatable character

Problem:

INSERT INTO DESTINATION.STORE_INFO SELECT * FROM SOURCE.STORE_INFO;

*** Failure 6706 The string contains an untranslatable character.

 

Solution:

Its failing for Character mismatch between DESTINATION table and SOURCE table. Following way, we can compare char type of two table.

 

(sel a.columnname,a.chartype

from dbc.columns a where databasename IN('SOURCE')

and tablename='STORE_INFO'

MINUS

sel b.columnname,b.chartype

from dbc.columns b where databasename IN('DESTINATION')

and tablename='STORE_INFO')

UNION ALL

(

sel b.columnname,b.chartype

from dbc.columns b where databasename IN('DESTINATION')

and tablename='STORE_INFO'

MINUS

sel a.columnname,a.chartype

from dbc.columns a where databasename IN('SOURCE')

and tablename='STORE_INFO'

);

 

ColumnName

CharType

Market_Item_Segment_Cd       

2

Market_Item_Segment_Cd       

1

Market_Item_Name             

2

Market_Item_Name             

1

 

If we check the table definition for following column:

DESTINATION DB:

  Market_Item_Name VARCHAR(100) CHARACTER SET UNICODE NOT CASESPECIFIC

  Market_Item_Segment_Cd VARCHAR(8000) CHARACTER SET UNICODE NOT CASESPECIFIC

 

SOURCE DB:

Market_Item_Id VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC,

Market_Item_Segment_Cd VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC

 

Fix the character set 

Comments