从一列中提取字符并将它们填充到 2 个不同的列中 ssis 派生列

Extract character from one column and populate them in 2 different columns ssis derived column

我有一个 ProductDetails 列,其值如

j Jameson Mbc 6.5, abc 8 abc blah
Napa california Mbc 1 abc 3.5
Washington k Mbc 2.5 abc 6
New york city is awesome

我有几千条记录

我想填充另外 2 列 Mbc 和 abc,如下所示

Mbc
6.5
1
2.5

abc
8
3.5
6

我试过了(DT_STR,10,1252)substring(ProductDetails, findstring(“Mbc”, ProductDetails,1)+4,3)

对于 abc= (DT_STR,10,1252)substring(ProductDetails, findstring(“abc”, ProductDetails,1)+4,3)

我得到结果,一些值以 1C2b 等形式出现,只需要数字而不需要字符

对于列值如 New york city is awesome 我们只想用 Null 等填充它

谢谢

"abc"列

FINDSTRING( [ProductDetails],"abc", 1 ) > 0 ? SUBSTRING(SUBSTRING([ProductDetails], FINDSTRING( [ProductDetails],"abc", 1 ) + 4 , 3),1,LEN( SUBSTRING([ProductDetails], FINDSTRING( [ProductDetails],"abc", 1 ) + 4 , 3) ) - FINDSTRING( SUBSTRING([ProductDetails], FINDSTRING( [ProductDetails],"abc", 1 ) + 4 , 3) ," ",1)) : NULL(DT_WSTR,50)

"Mbc"列

FINDSTRING( [ProductDetails],"Mbc", 1 ) > 0 ? SUBSTRING(SUBSTRING([ProductDetails], FINDSTRING( [ProductDetails],"Mbc", 1 ) + 4 , 3),1,LEN( SUBSTRING([ProductDetails], FINDSTRING( [ProductDetails],"Mbc", 1 ) + 4 , 3) ) - FINDSTRING( SUBSTRING([ProductDetails], FINDSTRING( [ProductDetails],"Mbc", 1 ) + 4 , 3) ," ",1)) : NULL(DT_WSTR,50)