MSCEWI2051
Teradata BYTES function results differs from Snowflake LENGTH function for byte columns
Severity
Description
create table exampleTable(
bytecol byte(10)
);
insert into exampleTable values ('2B'XB);
select bytes(bytecol) from exampleTable;
-- Will return 10, the size of bytecolcreate table exampleTable(
bytecol binary
);
insert into exampleTable values (to_binary('2B'));
select length(bytecol) from exampleTable;
// Will return 1, the size of the value 2BExample code:
Input code:
Output code:
Recommendations
Last updated
