Reputation: 265
I have 3 Replace expressions that resolve in SSIS derived columns. When I attempt to combine them into 1 string they error. The replace are all in the same column. Immediately below are the 3 resolved expressions.
REPLACE([Column1],":",":")
REPLACE([Column1],"\n"," ")
REPLACE([Column1],"</div>"," ")
Below are the 2 unresolved expressions I have attempted.
REPLACE([Column1],":",":","\n"," ","</div>"," ")
Replace(Replace([Column1],":",":"),"\n"," "),"</div>"," ")
Any assistance in getting the correct syntax is greatly appreciated.
Upvotes: 3
Views: 10312
Reputation: 11
Try
(REPLACE([COURSE_CODE],":",":"))+REPLACE([COURSE_CODE],"\n"," ")+REPLACE([COURSE_CODE],"</div>"," ")
Upvotes: 0
Reputation: 3106
Check This.
\
is escape character. If you want to have single backslash literal inside SSIS string you have to escape it and use \\
Code :
REPLACE(REPLACE(REPLACE([Column1],"</div>",":"),":",":"),"\\n"," ")
in your code you missed 3rd replace function.
Code:
Output :
Upvotes: 0
Reputation: 3591
This will replace your [Column1] with all your values.
REPLACE(REPLACE(REPLACE([nightrate],":",":"),"\n"," "),"</div>"," ")
Upvotes: 7