字符串问题
jj23= "A "
jj28= "B "
jj31= "B "
jj34= "C "
字符串组合jj23+jj28+jj31+jj34= "ABBC "
其中要加限制条件,不能有重复字符出现,
即最后应该显示为“ABC”
如何在以下的sql中实现字段连接时不出现重复字符
select jj05,jj06,jj23+jj28+jj31+jj34 as t from jjk
[解决办法]
jj23= "A "
jj28= "B "
jj31= "B "
jj34= "C "
lcString= ' '
lcString=iif(jj23$lcString,lcString,lcString+jj23)
lcString=iif(jj28$lcString,lcString,lcString+jj28)
lcString=iif(jj31$lcString,lcString,lcString+jj31)
lcString=iif(jj34$lcString,lcString,lcString+jj34)
select jj05,jj06,&lcString. as t from jjk