Redshift - truncating string when inserting to target -
i have 2 tables. table operational store , table b destination table.
table ddl: column varchar(1000)
table b ddl: column b varchar(250)
so i'm trying insert of truncated column so: insert table b (select left(table a.column a, 249)) , gives error
"error: value long character type"
i have tried substring try , truncate text no avail. please note, there arabic text in column - hasn't been issue in table a.
any / suggestions appreciated!
to around issue of multi-byte characters, can cast field desired varchar size using ::varchar([some length]). example, do:
insert table b (select table a.column a::varchar(250))
Comments
Post a Comment