My data step is only there to illustrate that
'' = ' '
in SAS. Since SAS does not know a varchar type, but only character with a given length (>= 1), all empty/missing character variables will at least contain one blank, so a statement in SQL like
case
when X = ''
then ' '
else X
end as X
won't change anything. You need to redefine your logic in light of this fact.
... View more