I researched delimit issue for a while and I pull useful codes here and there, but I can’t quite put it together.
I’m trying to parse the string by word in SSIS and I NEED help on vb script component.
I need to delimit my column data to the following deliminator:
“AND”,”OR”,”**”, “,”
I have a table like this
ID Description
1 apple AND orange, tangerine
2 avocado OR guacamole AND pineapple OR fruit
3 watermelon ** melon
And I want to parse the data like this
ID Description
1 apple
1 orange
1 tangerine
2 avocado
2 guacamole
2 pineapple
2 fruit
3 watermelon
3 melon
Thank you.
In order to parte string by words is enought a combination of replace a split:
(I assume that you know how to take ID)
this return a array of elements as you ask for:
so far, help with vb. I don’t know what you want to do in SSIS: a calculated member? a named set? Extend fact table? Read second answer part:
Second part:
To convert a row in multiples row you need a script. You can find a good example in SSIS – Script Component, Split single row to multiple rows post.