Cast CHAR

Database

Cast CHAR

SEL CAST('A'AS CHAR(10));

SEL CASE WHEN 1=1 THEN CAST('A' AS CHAR(10)) ELSE 'Y' END;

The first query gives 'A' followed by 9 spaces.

The Second query gives 'A' and no other spaces suffixed.

What is the reason for this difference in behaviour of cast function in CASE statement

1 REPLY

Re: Cast CHAR

Hi Sharatbalaji,

I'm unsing Teredata SQL Assistant V14.0.0.1 and in my environment both the statements giving 10 only.