The result type of the iif()
depends on input and in case of string the result type seems to be char(x)
where x
is the length of the longest input string. Thus the "item"
will be padded with 4 spaces to make it as long as the "campaign" is. I think this is by design but you may want to enter an ticket to the FB issuetracker.
So the iif()
return "item "
in case of first parameter being false and when you store spaces onto varchar
field they are preserved.