Hi,
T1 = TRIM(TRAILING FROM Str1)
type(TRIM(TRAILING FROM Str1) ) states that this is a varchar(10) - so you put in a char(10) and convert it to a varchar(10).
-> LT1 = CHARACTER_LENGTH(T1) = 0
Now your case:
CASE
LT1
WHEN
0 -> TRUE -> Str1 -> CHAR(10) which is TStr1
-> CHARACTER_LENGTH(TStr1) = 10
so to me everything is as expected and no issue...
You chose the implicited casted varchar(10) for your condition but the original value for your furthe processing and these are different.
Hi,
T1 = TRIM(TRAILING FROM Str1)
type(TRIM(TRAILING FROM Str1) ) states that this is a varchar(10) - so you put in a char(10) and convert it to a varchar(10).
-> LT1 = CHARACTER_LENGTH(T1) = 0
Now your case:
CASE
LT1
WHEN
0 -> TRUE -> Str1 -> CHAR(10) which is TStr1
-> CHARACTER_LENGTH(TStr1) = 10
so to me everything is as expected and no issue...
You chose the implicited casted varchar(10) for your condition but the original value for your furthe processing and these are different.