SSIS : Removing unnecessary characters ;# from sharepoint list data
when we are loading data from Sharepoint list we will get some extra characters with the actual colum value .
For example : if the column (Level 1) value is Collaboartion then when we are using SSIS that value will come like 16;#Collaboration . But we need to store only actual data in that case we need to correct that column data .
To solve this issue we need to keep a derived column after sharepointlist source and give the Expression
SUBSTRING([Level 1],FINDSTRING([Level 1],"#",1) + 1,255 - FINDSTRING([Level 1],"#",1))
i will explain you how it will work
for Example if we take column value 16;#Collaboration
FINDSTRING([Level 1],"#",1) this function retuns value where search string occurs for the first time
in the above case it 4 so the final substring expression looks like
SUBSTRING('16;#Collaboration',4 + 1,255 - 4)
SUBSTRING('16;#Collaboration',5,251)
This returns substring from 5th position to 251 position
which is => Collaboration
For example : if the column (Level 1) value is Collaboartion then when we are using SSIS that value will come like 16;#Collaboration . But we need to store only actual data in that case we need to correct that column data .
To solve this issue we need to keep a derived column after sharepointlist source and give the Expression
SUBSTRING([Level 1],FINDSTRING([Level 1],"#",1) + 1,255 - FINDSTRING([Level 1],"#",1))
i will explain you how it will work
for Example if we take column value 16;#Collaboration
FINDSTRING([Level 1],"#",1) this function retuns value where search string occurs for the first time
in the above case it 4 so the final substring expression looks like
SUBSTRING('16;#Collaboration',4 + 1,255 - 4)
SUBSTRING('16;#Collaboration',5,251)
This returns substring from 5th position to 251 position
which is => Collaboration
Comments
Post a Comment