2
在我的SSIS包中使用的腳本下方。如何使用多個分隔符分割字符串
If (Row.AnswerType.Trim().ToUpper = "MULTIPLE SELECT" And _
Row.SurveyQuestionID = Row.SurveyDefinitionDetailQuestionNumber) Then
Dim Question1 As String = Row.SurveyDefinitionDetailAnswerChoices.ToUpper.Trim()
Dim ans1 As String = Row.SurveyAnswer.ToUpper.Trim()
For Each x As String In ans1.Split(New [Char]() {CChar(vbTab)})
If Question1.Contains(x) Then
Row.IsSkipped = False
Else
Row.IsSkipped = True
'Row.IsAllowed = True
Row.ErrorDesc = "Invalid Value in Answer Column For Multiple Select!"
End If
Next
End If
此腳本僅在使用製表符作爲分隔符時纔會成功。但我需要製表符和非製表符作爲分隔符。
非常感謝Olivier – Dinesh 2013-02-17 16:25:31