我有3个在SSIS派生列中解析的替换表达式。当我尝试将它们组合成1个字符串时,它们会出错。替换都在同一列中。紧接着是3个已解决的表达式。
REPLACE([Column1],":",":")
REPLACE([Column1],"\n"," ")
REPLACE([Column1],"</div>"," ")
以下是我尝试过的两个未解决的表达方式。
REPLACE([Column1],":",":","\n"," ","</div>"," ")
Replace(Replace([Column1],":",":"),"\n"," "),"</div>"," ")
非常感谢您获取正确语法的任何帮助。
答案 0 :(得分:0)
答案 1 :(得分:0)
检查这个。
\
是转义字符。如果你想在SSIS字符串中有单个反斜杠文字,你必须将其转义并使用\\
代码:
REPLACE(REPLACE(REPLACE([Column1],"</div>",":"),":",":"),"\\n"," ")
在您的代码中,您错过了第3次替换功能。
代码:
输出:
答案 2 :(得分:-1)
尝试
(REPLACE([COURSE_CODE],":",":"))+REPLACE([COURSE_CODE],"\n"," ")+REPLACE([COURSE_CODE],"</div>"," ")