vertica 7.2 vs 7.1 merge. Error in 7.2

When doing merge with vertica 7.1 on two tables works fine. When doing merge with vertica 7.2 getting error..[

Code: 4800, SQL State: 22001] [Vertica]VJDBC ERROR: String of 5 octets is too long for type Char(4)

MERGE INTO TESTSRI TGT USING TEST2_TSTG SRC
ON VALID_VALUE_ENTITY_CD = 'T_REVENUE' AND TGT.T_REVENUE_CD = SRC.VALID_VALUE_CD
WHEN MATCHED THEN
UPDATE SET LOAD_ID = SRC.LOAD_ID, T_REVENUE_CD = SRC.VALID_VALUE_CD, T_REVENUE_DESC = SRC.VALID_VALUE_DESC
WHEN NOT MATCHED THEN
INSERT(T_REVENUE_SK, T_REVENUE_CD, T_REVENUE_DESC,LOAD_ID) VALUES(-1, SRC.VALID_VALUE_CD, SRC.VALID_VALUE_DESC, SRC.LOAD_ID);

'T_REVENUE' is varchar(20) AND TGT.T_REVENUE_CD is char(4) .

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file